MySQL Backup (mysqldump)


There are plenty of ways of backing up MySQL, however my personal preference is to use MySQL dump, here’s how you do it:

To backup:

mysqldump -u [USERNAME] -p  [DATABASE] > backup.sql

[USERNAME]: Replace this with your MySQL Username
[DATABASE]: Replace this with the name of the database you wish to backup




To Restore:

mysql -u [USERNAME] -p [DATABASE] < backup.sql 

[USERNAME]: Replace this with your MySQL Username
[DATABASE]: Replace this with the name of the database you wish to backup

, , , , ,

  1. No comments yet.

You must be logged in to post a comment.

Comments are closed.