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.

Backup

1. Open a Command Line or Shell

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

Restore

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

1. login mysql: mysql -u root -p

2. CREATE DATABASE test;

3. Restore the test database

 

 

Leave a Reply

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

-->