skip to Main Content

How to backup mysql database (command line)

To backup:

mysqldump -u username -p database_to_backup > backup_name.sql

To restore:

mysql -u username -p
CREATE DATABASE database_name;
exit

mysql -u username -p database_name < backup_name.sql
This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *



Back To Top