How to copy a database from server A to server B:

(Assumes database name is the same on both servers.)

On server A:

backup_mysql_db $dbName > /tmp/$dbName.sql

On local:

scp A:/tmp/$dbName.sql B:/tmp

On server B:

mysql -uroot -p < /tmp/$dbName.sql

If any modifications are needed, they would be run on server B at this point.