This article provides a guide for how to import a large database in cPanel using SSH. This technique is helpful with a database that is too big to import using phpMyAdmin's web interface.
How to Import a Large Database in cPanel Using SSH
To import a large database in cPanel using SSH, follow the steps below:
- Login to the cPanel server via SSH console.
- Run the following command:
(Replace 'user_name' with the database user, 'database_name' with the database name, and 'file.sql' with the with the actual file name including relative file location.)gunzip -c your_database_backup.sql.gz > /path/to/file.sql mysql -p -u user_name database_name < /path/to/file.sql - Enter the database user password and click "Enter/Return" to submit.
- This process may take some time, depending on how large the database is. When the import is complete, the SSH terminal will return "
[user@server ~] $" or similar default prefix.
Conclusion
You now know how to import a large database in cPanel using SSH (phpMyAdmin workaround).

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.