Using phpMyAdmin:
Click on the database's name on the left side of the screen.
Look in the middle where it says "View dump (schema) of database."
Click "Structure and data" and "send"
Click "Go"
You will receive (as a download) a .sql file that contains both the schema and the data. Importing that file into a new mysql setup will restore your complete database.
After you move, you can use phpMyAdmin to do the import, or (if you can telnet or ssh) you can use one of the command-line mysql utilities, or you can write your own PHP code to do so (it should not take more than five or so lines of code).