the code for that dump could be something like this:
DUMP
mysqldump -uroot -d db_to_dump > whatever.dump
(-d only dumps table structures)
IMPORT DUMP
mysql -uroot db_to_import < whatever.dump
-uroot just gives root access to mysql...whatever.dump can be named to whatever you want
when u import back to wherever u want to transfer that database, make sure that in the new place, the database already exists w/o any tables or data in it...the import will then just transfer everything...
if you want to include data, then take out -d in the mysqldump function
arif