The document provides information about MySQL training including:
- Installing MySQL and configuring multiple instances on a single host
- Taking backups with mysqldump including full database backups and consistent backups for InnoDB tables
- Restoring from MySQL backups by executing the SQL dump files
- Common MySQL commands for checking the server status, creating databases and users
- Storage engines like MyISAM and InnoDB and how to check the current storage engine for a table
With MySQL being the most popular open source DBMS in the world and with an estimated growth of 16 percent anually until 2020,we can assume that sooner or later an Oracle DBA will be handling a MySQL database in their shop. This beginner/intermediate-level session will take you through my journey of an Oracle DBA and my first 100 days of starting to administer a MySQL database, show several demos and all the roadblocks and the success I had along this path.
With MySQL being the most popular open source DBMS in the world and with an estimated growth of 16 percent anually until 2020,we can assume that sooner or later an Oracle DBA will be handling a MySQL database in their shop. This beginner/intermediate-level session will take you through my journey of an Oracle DBA and my first 100 days of starting to administer a MySQL database, show several demos and all the roadblocks and the success I had along this path.
MySQL Replication Basics -Ohio Linux Fest 2016Dave Stokes
This is a bare bones, getting started with MySQL replication presentation showing both GTID and non-GTID replication of MySQL relational databases plus some supporting MySQL utilities
MySQL has a set of utilities written in Python that can do some amazing things for your MySQL instances from setting up replication with automatic fail over to copying database
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
MySQL Replication has evolved since the early days with simple async master/slave replication with better security, high availability, and now InnoDB Cluster
ConFoo MySQL Replication Evolution : From Simple to Group ReplicationDave Stokes
MySQL Replication has been around for many years but how wee do you under stand it? Do you know about read/write splitting, RBR vs SBR style replication, and InnoDB cluster?
MySQL Replication Update -- Zendcon 2016Dave Stokes
How does MySQL work at a conceptual level and at a how-to-do-it level is covered in this presentation plus information on other replication options like Group Replication and Multi Master
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
MySQL Replication Basics -Ohio Linux Fest 2016Dave Stokes
This is a bare bones, getting started with MySQL replication presentation showing both GTID and non-GTID replication of MySQL relational databases plus some supporting MySQL utilities
MySQL has a set of utilities written in Python that can do some amazing things for your MySQL instances from setting up replication with automatic fail over to copying database
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
MySQL Replication has evolved since the early days with simple async master/slave replication with better security, high availability, and now InnoDB Cluster
ConFoo MySQL Replication Evolution : From Simple to Group ReplicationDave Stokes
MySQL Replication has been around for many years but how wee do you under stand it? Do you know about read/write splitting, RBR vs SBR style replication, and InnoDB cluster?
MySQL Replication Update -- Zendcon 2016Dave Stokes
How does MySQL work at a conceptual level and at a how-to-do-it level is covered in this presentation plus information on other replication options like Group Replication and Multi Master
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Mysql-Basics.pptx
1. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
MYSQL TRAINING
2. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Mysql =>
• Installation
• Install Multiple Mysql Instances on same host
• Change default location of data files
• Basic Mysql Commands
• Mysqldump
• Restore
3. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Mysql Installation=>
Mysql installation is based on RPMs that needs to be
installed on the server. Mysql software RPM’s is
available from dev.mysql.com as community version
which can be downloaded as per the OS on which the
installation needs to be done.
http://dev.mysql.com/downloads/mysql
Minimum of 2 RPMs are needed on the server, a server
and client RPM. Without client rpm installation, mysql
server cannot be accessible and hence its mandatory to
get both the rpms installed correctly.
4. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Install Multiple Instances of Mysql on same
host =>
Mysql services work as a daemon process on a machine. Although it’s
possible to run multiple daemon processes on a machine but it’s not a
official supported way and hence it’s not a recommended configuration
to be done on Production servers.
By giving different my.cnf configuration files with different data
directories, different socket & different port, different pid files we can
configure multiple instance of Mysql.
Regeneron Slave server “renritdb01b.regeneron.regn.com” is an
example of multiple Instances running on a host.
5. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Here is an example of how multiple Mysql
instances can run on a node.
-bash-3.2$ ps -ef |grep -i mysql
root 6592 1 0 2015? 00:00:00 /bin/sh /usr/bin/mysqld_safe --
datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-
error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid
mysql 11746 1 0 2011 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --
defaults-file=/opt/mysql5_data/my.cnf --datadir=/opt/mysql5_data/ --
user=mysql --pid-file=/opt/mysql5_data/node1.pid --skip-external-locking --
port=3341 --socket=/tmp/mysql41.sock
6. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Change default location of Myisam and
Innodb data files
When we do a new installation of mysql server then default data directory is /var/lib/mysql
on Linux OS.
If we need to change default directory to user defined then the steps needs to be
performed.
• Stop mysql services using command like /etc/init.d/mysql stop
• Change following parameters in /etc/init.d/mysql file
Edit the file and check for first occurrence of datadir variable and make changes to it
as below.
datadir=/data01/mysql-data/db
• change below parameters in /etc/my.cnf
datadir=/data01/mysql-data/db
innodb_data_home_dir = /data01/mysql-data/db
• Move all the datafiles from source to target folders
• Start mysql services with /etc/init.d/mysql start
7. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Basic Commands for checking Mysql is
running fine & for creating db or users=>
• It will tell us if db is working fine or any locks are there
on db & long running queries and the time for which the
process is either active or idle. It also shows the total no
of sessions being connected to the mysql server.
mysql> show processlist;
• Check Mysql is running on Server.
$ ps –ef |grep –i mysql
• Creating a new database
mysql> create database abc;
8. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
• How many db’s are in Mysql Instance
mysql> show databases;
• Create users in Mysql
mysql> create user abc@’localhost’ identified by
'abc'; -- This creates user and allow only local access to the user
mysql> create user abc@’%’ identified by 'abc';
-- This creates user and allow access over the network to the users
mysql> GRANT ALL PRIVILEGES ON DB1.* TO
'abc'@'localhost'; -- Grant all privileges on all the tables on
DB1 database to user which can connect locally.
mysql> GRANT ALL PRIVILEGES ON DB1.* TO
'abc'@'%'; -- Grant all privileges on all the tables on DB1
database to user which can connect locally.
9. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
mysql> GRANT ALL PRIVILEGES ON *.* TO
'abc'@'%'; -- Grant all privileges on all the tables on DB1
database to user which can connect on network.
We need to give below command after creating user so that it can
flush from memory and comes in affect.
mysql> flush privileges;
• Check the slave process status =>
mysql> show slave statusG
There are 3 values to look for in the status:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Seconds_Behind_Master: 0
10. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
• How to check locks and release all or specific
locks
mysql> show processlist;
+-----------+------------+------------------------------------------+---------
| Id | User | Host | db |
Command | Time | State
| Info |
+-----------+------------+------------------------------------------+---------
| 98485035 | jirauser | 10.31.82.49:35725 |
jiradb | Sleep | 1049 |
| NULL |
We will get all the info like from which db user, app
server (host) on which db lock is coming
11. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
If we need to release that lock we need to kill that ID, check ID for specific lock & kill
that id with kill “id” command.
Mysql> kill “id”;
• Mysql Service Start/Stop
#sudo to mysql
$/etc/init.d/mysql start => for starting
$/etc/init.d/mysql stop => for stopping
12. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
• Delete bin logs from Master when space is full on disk.
Check first how far is slave replication behind its master before purging the binary logs on
master instance:
Run show master status get bin log id
Mysql> show master status;
--Moving to next binary log
Mysql> flush logs;
mysql> Purge binary logs to <binlog from above-1>;
OR
Delete binary logs that are n days old
mysql> PURGE BINARY LOGS BEFORE DATE_SUB(
NOW( ), INTERVAL 2 DAY); -- Deleting all binary logs that are 2 days
old
13. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
• Skipping statements on slave when it’s stopped due to
errors:
mysql> SET GLOBAL sql_slave_statement_skip_counter=1; --
This will skip only the last problematic statement
Storage engines in Mysql:
Mysql daemon process acts as a framework which
can be plugged with one or many storage engines
to create table and store data in it. All storage
engines comes with different characteristics and
before creating a new database or a table it should
be decided in advance that the application is
compatible to which storage engine in mysql.
14. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Commonly used storage engines in Mysql are as follow:
1. MYISAM =>
MyISAM is the default storage engine. Each MyISAM table is stored on disk in
three files. The files have names that begin with the table name and have an
extension to indicate the file type. An .frm file stores the table format. The data
file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex)
extension.
Properties:
• MyISAM implements table-level lock for inserting and updating.
• MyISAM does not support transactions & foreign keys.
• Also a long running SELECT will also lock the table for other sessions
to access it.
• MyISAM tables are auto commit and hence it cannot be committed or
rolled back.
15. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
2. INNODB:
InnoDB is a transaction-safe storage engine for MySQL that has commit,
rollback, and crash-recovery capabilities to protect user data.
Properties:
• InnoDB row-level locking and Oracle-style consistent no locking
reads increase multi-user concurrency and performance.
• To maintain data integrity, InnoDB also supports FOREIGN KEY
referential-integrity constraints.
• The InnoDB storage engine maintains its own buffer pool for caching
data and indexes in main memory.
• InnoDB stores its tables and indexes in a tablespace, which may
consist of several files (or raw disk partitions). This is different from,
for example, MyISAM tables where each table is stored using separate
files.
16. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
We can create db with storage engine, we can create
table with non default storage engine
mysql> CREATE TABLE t (i INT) ENGINE = INNODB;
&
we can change storage engine of an existing table like
below command,
mysql> Alter table t (i INT) ENGINE =MYISAM;
17. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
How to find current storage engine for a table =>
mysql> show table status like 'onlineregsession'G
*************************** 1. row ***************************
Name: onlineregsession
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 1725842
Avg_row_length: 384
Data_length: 663991508
Max_data_length: 281474976710655
Index_length: 117795840
Data_free: 0
Auto_increment: 1726849
Create_time: 2011-06-11 19:35:03
Update_time: 2012-04-30 02:12:39
Check_time: 2011-06-11 19:36:40
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
18. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
MYSQL BACKUP & RESTORE
MYSQLDUMP
Mysqldump is a logical backup tool equivalent to exp/imp tool of oracle.
It is used to dump a database or a collection of databases for backup. It
creates a *.sql file with DROP table, CREATE table and INSERT into
sql-statements of the source database. To restore the database, execute
the *.sql file on destination database.
1) Backup a single database
$mysqldump -u root -p[root_password] -–databases [database_name] >
dumpfilename.sql
2) Backup Multiple databases
$mysqldump -u root -p[root_password] --databases db_name1
db_name2 > dumpfilename.sql
19. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
3) Backup all databases containing MyISAM and/or Innodb tables –
CONSISTENT DUMP.
mysql> FLUSH TABLES WITH READ LOCK;
Query OK, 0 rows affected (0.00 sec)
From second session, use below command for backup
$mysqldump --all-databases –single-transaction --master-data=2
>dbdump.db
When backup will be finished then from first session where we acquire
read lock give below command to release locks
mysql> UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)
4) Backup all databases containing MyISAM and Innodb tables
– INCONSISTENT DUMP
$mysqldump --all-databases >dbdump.db
20. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
--single-transaction : This option sends a START TRANSACTION SQL
statement to the server before dumping data. It is useful only with
transactional tables such as InnoDB, because then it dumps the
consistent state of the database at the time when BEGIN was issued
without blocking any applications. This is a method for taking a consistent
backup of innodb tables. This option will not take consistent backup of
Myiasm tables. This is not lock any Innodb tables and a consistent backup
can be taken without impacting any production processes.
For taking consistent backup of Myisam tables there are 2 options
available.
• Take a mysql session connecting to the server and run FLUSH
table with read locks. This will lock all the tables on the database with read
lock with no DML operation permitted. From another session take
mysqldump with consistent image. Release the locks from the first
session.
21. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
• If there is a slave configured for primary database, then on
slave perform the following:
Stop the slave process on slave server. Initiate mysqldump, this will be a
consistent backup since no transactions are getting written onto slave.
Once the dump is completed, the again start the slave process.
Restore backup which are taken by mysqldump utility
1. If we took backup of a single database & didn’t use --database
switch while backup then we need to create database before restore
mysql> create database database_name;
$mysql -u root -p[root_password] [database_name] < dumpfilename.sql
2. When took backup with --database switch then no need to create
database manually
$mysql -u root -p[root_password] < dumpfilename.sql
22. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
3. If we have multiple database backup & we need to restore only
one, put db name which we want to restore in restore command
$mysql -u root -p[root_password] dbname < dumpfilename.sql
23. Click to edit Master title style
Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
Thank You