Return to "MySQL"

Importing MySQL Database Content


 
The topic of this article is not supported by our customer support department, however for your convenience we are providing this material to assist you in troubleshooting potential issues related to this topic.

MySQL allows you to import/export text files containing database entries in a standardized format. By creating a MySQL Dump file, you will have an exact copy of your database in a single file; this file can be saved for emergency purposes and can be imported back in to MySQL to re-create and restore your database contents.

Importing a Database Dump Through PhpMyAdmin.

Login to phpMyAdmin at http://yoursitedomain.com/phpmyadmin
On the front page under Create new database type in the database name you are going to import then click Create.
Under the Import tab and in File to import, click on the Browse button. Select the file and click Go.

Importing a Database Dump Through SSH

Upload the sql dump through FTP to any directory that you have access to.
Connect to your server with an SSH client using the domain name and the FTP username and password.
Change to the directory that you have uploaded the file to, type the command: cd your_directory/
Once you are in the same directory as the SQL dump, type the command: mysql database_name < sql_dump_file

NOTE: database_name will be the name of the database that you’re restoring; sql_dump_file represents the file that the SQL dump is saved to. Depending on the size of your database, the restore may take a few minutes to complete.