How do I import large SQL databases?

If you have trouble importing large database dumps (.sql) files into PHPMyAdmin, the alternative is to upload it to your FTP root and use the SSH command line to import it. Before importing the database, make sure you have created it in cPanel and assigned the user all privileges. The command to import the database is:

mysql -u user_name -p database_name < dump_file.sql

After you hit the Enter key, you will be asked for the user's password. Type this in and press Enter again, the database will be imported. You can go in to phpMyAdmin to check it has been imported correctly.

This is done through an SSH application. One that we recommend using is Putty. You can download this for free at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (Download the Putty.exe file.)

Host field is the domain name, make sure SSH is selected. Login as: use cpanel user name and the password is your cpanel password.

  • 9 Users Found This Useful
Was this answer helpful?

Related Articles

How do I back up a MySQL Database?

You can backup your database two ways. 1. Click on Backup in Cpanel then click on the...

Can I connect to MySQL remotely?

Yes, you can connect to your MySQL database remotely using a client such as MySQL-Front at...

How do I create a database in MySQL?

You can create a database via your control panel by clicking on the MySQL icon. When you create...

How do I import and export a MySQL DB using phpMyAdmin?

Step 1: Open phpMyAdmin and select the database from where you want to export data and/or...

What are the connection settings for my MySQL Database?

The hostname to connect to is "localhost"; without the quotes. The database username and password...