If you want to import your MySQL database through SSH on your VPS or dedicated server, use the following command:
mysql -u username -p database < file.sql
username – the username for the MySQL database, database – database name, file.sql - the file you want to include the MySQL dump.
After running the command you should enter the password for MySQL database, in case to complete the importing.
If you want to export MySQL database through SSH, use the following command:
mysqldump -u username -p database > file.sql