- Export Mysql Database dump using SSH
mysqldump -u <username> -p <password> <dbname>>filename.sql
Note : above command will download the sql file to user directory of the server and make sure to run above command we should not go to mysql prompt just login to the server using ssh . the arrow symbol > is used to export and < will be used to import the sql data file into database .
- Connect with mysql in Linux (SSH)
mysql -u <username> -p
then it will ask for password enter password and you are now in Mysql prompt .
- Change the current working Database
use <dbname>;
above command will switch the database , now you can operate the selected database .