How to Backup and Restore a MySQL Database Using mysqldump

Posted on Posted in General IT Info

How to Backup a MySQL Database With mysqldump

mysqldump -u userNameWithPrivileges -p databaseName > outputFileName.sql

How to Restore a mysqldump Backup

mysql -u userNameWithPrivileges -p database < outputFileName.sql

* Replace “userNameWithPrivileges” with the username of a MySQL account that can read/write to the database being backed up / restored.

MySQL logo

Leave a Reply

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