The file must be in .sql format. It can not be compressed in a .zip or .tar.gz file.
1. Upload the SQL file to the server eg. file_import.sql.
2. If the database does not exist please create one with an user. Note the username and password.
3. Log into the server through SSH
4. Type this this command: mysql -pPassword database_name < file_import.sql

I have wrote detail steps about how I successfully imported the mysql database using SSH via terminal. I have tested in Server version: 5.5.41-0ubuntu0.14.04.1 (Ubuntu).


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)