How to import a MySQL database via SSH

You may import your MySQL 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 konsoleH.
mysql -u[MySQL Login] -h[MySQL Server] [MySQL database] -p < dumpfile.sql

Kindly 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 konsoleH File Manager.

Do you need further assistance? Contact us
Email
Share