Tag: backup
Backup a MySQL database
by Andrew on Nov.27, 2009, under Linux, MySQL, SQL
I’ll just quickly cover some options here to backup a MySQL database.
The first will output all the data and all the databases along with the schema:
mysqldump -u <user> -p -h <hostname> --all-databases > all_databases.sql
The next option will output just the schema for all of the databases:
mysqldump -d -u <user> -p -h <hostname> --all-databases > all_databases.sql
Now we can use the same two methods above but replace –all-databases with the name of a database to output just one.