Practical Web Programming

Wednesday, June 18, 2014

Backup/Restore MySQL Database

Backup mysql database to a sql file.

$ mysqldump -u root -p[root_password] [database_name] > filename.sql

Restore from sql file to database.

$ mysql -u root -p[root_password] [database_name] < filename.sql

0 comments:

Recent Post