fbpx

How to restore a MySQL database from the command line

To restore a MySQL database from the command line use this command:

mysql -uuser -p name_of_database < backup_file

For example:

mysql -uroot -p Customers < mysql_backup_29_03_2019.sql

This command starts up MySQL and then pipes the backup file into the database that you specified.

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

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

Scroll to Top