[MySQL]: Backup & Restore Databases

Backup:

mysqldump -u root -p'root_password' DB_NAME > dumpfilename.sql

Restore:

mysql -u root -p'root_password' DB_NAME < dumpfilename.sql

Backup whole server:

mysqldump -u root -p'root_password' --all-databases > all-database.sql

Leave a Reply

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