A quick and very basic list of commands to get you started with command line.
If you need to know how to log in to ssh with command line and manage a database you can follow the instructions below. You will find how to import a database with command line, how to export it and how to drop it. There are also some other quick tips if you are working with WordPress.
I use this step-by-step to manage Wordpress sites and their relative database.
Log in to ssh
Drop old database
Delete the existing DB
mysqladmin -u your_username -p drop database_name
mysqladmin -u your_username -p create database_name
mysql –h my_sql_host –u my_slq_username –p my_sql_dbname < dbname.sql
Update .htaccess file and make it writable
Go to root folder then type: -be careful when changing permissions
touch .htaccess chmod 666 .htaccess
Export a database
mysqldump -h my_sql_host -u my_slq_username -p my_sql_dbname > dbname.sql
Copy a database to Desktop
log out of ssh
scp firstname.lastname@example.org:filepath/filenamw.txt ~/Desktop