Using SSH, execute the following command:
# mysqldump -p -u username database_name > dbname.sql
Once executed, your database will be exported to your /home/username/public_html/ location.
Using SSH, execute the following command:
# mysql -p -u username database_name < file.sql
Now, just the opposite, upload your database raw file to your /home/username/public_html/ location.