Backing up MySQL using mysqldump

 

To backup all the databases on a mysql system use the following command

mysqldump --all-databases > backup.sql -u root -p

To restore the database from the backup use

mysql -u root -p < backup.sql

Leave a Reply

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