MySQL Command Line Backup and Restore

How to Back Up and Restore a MySQL Database

If you’re storing¬†anything in MySQL databases that you do not want to lose, it is very important to make regular backups of your data to protect it from loss.


1. Open a Command Line or Shell

2. Use the following command to backup the database with the name test.


First create a database and log into the mysql shell as a privileged user:

1. login mysql: mysql -u root -p


3. Restore the test database



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.