How to import file into a database using SSH?

To import date using this method, you will have to upload the SQL file in your account first and then login via SSH to this account.

Once this is done, use the following command, replacing the name, username, host and password with your database ones:

mysql DB_NAME -uDB_NAME -hMYSQL_HOST -pPASSWORD < /home/www/path-to/file.sql