Backup & Restore MySQL Database Tables Print

  • 6

To backup and restore a MySQL database with all tables from a command prompt:

To Backup the database:

mysqldump -u username -ppassword database_name > dump.sql

To Restore the file:

mysql -u username -ppassword database_name < dump.sql

Here's a Great Document explaining the process in more detail:

http://www.mydigitallife.info/2007/07/21/how-to-backup-and-restore-export-and-import-mysql-databases-tutorial/


Was this answer helpful?

« Back