Random Linux

Linux, video games and web hosting

You are able to use the command line to restore a database using the mysql command.  To restore a file named backup.sql to the database data_base, first make sure that the database is empty, then you can run

mysql -o data_base < backup.sql 

It is good to use mysql -o when restoring the database, which makes sure to only affect the database that you specify in the command.

January 8th, 2011

Posted In: MySQL

Tags:

Leave a Reply

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

*