Backup MySQL Database
Question
How can I back up all of the data in my MySQL database?
Answer
When using MySQL for your database, you can export the entries, comments, templates, and all settings into a single file.
Using phpMyAdmin
If your host has phpMyAdmin available on your server, you can use this tool to export your database.
- After selecting your database, click the Export link. This should bring up a new screen that says View dump (schema) of database (or something similar).
- In the Export area, click the Select All link to choose all of the tables in your database.
- In the SQL options area, make sure both the Structure and Data options are selected.
- Check Save as File and then click the Go button. A dialog box should appear prompting you to save the file locally.
From the Command Line
You can also create a backup with command line access:
mysqldump -h server -u username -ppassword database > filename
using the appropriate values:
- server - your MySQL server name
- username - your database username
- password - your database password (note there is no space between
-pand the password) - database - your database name
- filename - the name you want for the dump file


