mysqldump DBNAME --add-drop-table -u USERNAME-p > mysqldump.sql
Remember when going to older versions of mysql to do a search and replace for "USING BTREE" as it is not supported in older mysql installs.
This file can then be imported via:
mysql DBNAME -u USERNAME -p < mysqldump.sql
This post is mostly for my own information, I keep forgetting the exact order of the arguments!