Log into SSH on your old server.
mysqldump -u username -p database_name > dumpfile.sql
That will prompt you for your password and export the database into a text file that you can use to recreate the database on your new server as follows:
mysql -u username -p database_name < dumpfile.sql
*Note: The username is your mysql username, not your web account username.