There was a problem loading the comments.

How can I import my MySQL database?

Support Portal  »  Knowledgebase  »  Viewing Article

There are two main ways to upload a MySQL database, we would strongly recommend the second method when importing larger files:


You can use phpmyadmin in order to import the database if this is a smaller file. To do this, login to phpmyadmin from the MySQL Database option of your hosting control panel, select the database and then click the 'Import' tab at the top of the page.


From there click the 'Browse' button and select the file to import, click 'Go' and the file will be imported.

MySQL command line

This method will require you to have SSH access to the package (guide here). One you have connected using SSH move to the folder that the .sql file exists in and then run the following command where hostname is the host for the database, username is the username and databasefile.sql is the name of the backup file:

mysql -h hostname -u username -p username < databasefile.sql

You will then be prompted for the password once hitting 'Enter'. Enter the passsord (this won't show on screen as you type/paste) and hit 'Enter' again and the import will start. If there are any issues you will be receive an output with the error message but if this completes succesfully you will get the command prompt again with not output and this will have completed the process.

***Please note - the file will need to be in .sql format to import, if you have a zipped file this will need unzipping first.***

Share via
Did you find this article useful?  

Related Articles

© Eco Web Hosting