Have a look here: http://www.mysql.com/doc/en/Command-line_options.html

Also, when moving your data from one site to another, I recommend a tool like mysqldump to dump the data. You can use the mysql command line tool on the other end to import the data again.

Another handy way to do this is with phpMyAdmin

Best of luck.