Knowledge Base Article

How to restore a database on my Dedicated server via SSH?

Once you have logged in to your dedicated server as root via SSH, go to the folder where the dump file of your database resides. Once in it, type the following command to import it into the selected database:



mysql DATABASE_NAME < BACKUP.sql

 

Change DATABASE_NAME with the actual name of the database into which you want to restore the backup.



Note that if the dump file of your database contains a "CREATE DATABASE" clause you will have to delete this line from the dump file. Since it contains only plain text, you can use any text editor to do that.



Rating

Please indicate if this article was helpful for you.

rating :  4.3 from 5
views :  1316
votes :  7

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!