October 2016
Beginner
406 pages
7h 50m
English
This recipe shows you how to back up your MySQL databases using mysqldump. The utility connects to the MySQL server, queries the structure of the database and its data, and outputs the data in the form of SQL statements. The backup can then be used to restore the database or populate a new database with the data.
This recipe requires a running MySQL server and access to either MySQL's root user or another user with the necessary privileges to perform the backup.
Follow these steps to make a backup of a MySQL database:
mysql -u root -p packt
FLUSH TABLES statement to set the database's tables read-only:
FLUSH TABLES WITH ...Read now
Unlock full access