Back to Working with a Database

Importing Large MySQL Databases In SSH

If you have a large database dump ( .sql ) that you cannot upload through phpMyAdmin due to it’s size, the alternative is to upload it to your ftp root and use the command line to import it. You can request SSH access for your domains in the Reseller Support Queue here:

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.

Related Articles

How To Use The MySQL Database Wizard
How To Use PHPMyAdmin
How To Backup Your Database Using PHPMyAdmin
Connecting To MySQL Remotely
How To Restore An SQL Database In cPanel

Can’t Find what you need?

No worries, Our experts are here to help.