How to Import a Large Database in cPanel Using SSH

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:

  1. Login to the cPanel server via SSH console.
  2. Run the following command:
    gunzip -c your_database_backup.sql.gz > /path/to/file.sql
    mysql -p -u user_name database_name < /path/to/file.sql
    
    (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.)
  3. Enter the database user password and click "Enter/Return" to submit.
  4. 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).

  • database, import, mysql, mariadb
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Video: Create Email Address in cPanel

This video tutorial demonstrates how to create an email address using cPanel Shared Hosting...

Video: Change Primary Language in cPanel

This video tutorial provides Step-by-Step instructions for changing the Primary Language settings...

Video: How to Enable Spam Protection in cPanel

This video tutorial provides Step-by-Step instructions for enabling spam protection in cPanel...

Video: Set Default Email Address in cPanel

This video tutorial provides Step-by-Step instructions for setting the Default Email Address in...

Video: How to Setup Domain Redirects in cPanel

This video tutorial provides Step-by-Step instructions how to setup domain redirects in cPanel...