You can use the mysqldump program.
Use it from the command line like:
mysqldump --opt dbname table > somefile.out
you also can leave out the table name if you want the whole db.
then copy the output file over to the new machine, create the databases and run
mysql dbname < somefile.out
you may also have to specify the username and/or passwords to run those commands...
-Jeff