Managing databases via SSH command line
Managing databases via the SSH command is typically necessary & may be quicker than using the phpMyAdmin web interface. If you do not presently have SSH access on your hosting account, you may need to request it via our support department as we have a tendency to don’t enable SSH by default for security reasons.
When using the -p flag, you may be prompted to enter the password for the username specified. This password are the password specified nominative once creating the database username through cPanel.
Exporting a mySQL database:
mysqldump -p -u username database_name > databasename.sql
Importing a mySQL database:
mysql -p -u username database_name < databasefile.sql
Note: The database file (.sql extension) should be situated on the server. we suggest uploading it to your /home/ directory and dealing from that directory. We do not recommend placing a database file into any publically accessible directory.
An alternative to importing or exporting a database mistreatment ssh would be to use the phpMyAdmin net interface. If your database is very large, you will notice that using the ssh import/export choices are better suited to perform the task.
If the steps above listed in this article do not resolve your issue, please feel free to contact us or open a support ticket.