Sometimes, phpmyadmin just do not cut it, especially if you are dealing with slightly larger files, so command line comes to the rescue. It if a pain if it is filed away in your neuro system and can not retrieve it in an instance. So here it is:
backup
mysqldump -u USER -pPASSWORD DATABASE > filename.sql
restore
mysql -u USER -p DBNAME < dump.sql
a very sloppy way to pipe mysqldump output to another host:
user@host1$ mysqldump mydbname | ssh host2 "mysql mydbcopy"
a more proper way:
The first host is where you want to copy FROM and the second is where
its going TO.