Restore MySQL Database

Login as root user, and upload the file to be restored to the /root folder i.e /root/example_db.sql and run following command:

mysql -u root -p -h localhost example_db < example_db.sql

Then enter the password, for example, exampledbpassword

That will then restore the content of the example_db.sql file to the database on the server called exammple_db

Author: Christopher Smith

I managed websites.

Leave a Reply

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