How to import a database via SSH

You may import your database via command-line using SSH by following the below steps:

  1. SSH to your domain.
  2. Navigate to the directory (folder) where your database dump file has been uploaded to.
  3. Run the following import command. Replace the brackets and the information within them with your database information. Your database information can be found within Manage MySQL in the control panel.
mysql -u[MySQL Login] -h[MySQL Server] [MySQL database] -p < dumpfile.sql

Assist Note

Prior to importing the database, SSH will need to be enabled for your domain and you will need to upload the database dump file via FTP or the File Manager.