Backing Up and Transferring MySQL Tables
Copy entire database
Back up an entire database:
$ mysqldump -u user -p db-name > db-name-backup-YYMMDD.sql
Copy the back up to a new database
$ mysql -u user -p db-name < db-name.outdb-name-backup-YYMMDD.sql
Copy a table from one database to another
Create a table maintaining the engine, primary keys and indexes
CREATE TABLE `dst_database`.`table_name` LIKE `src_database`.`table_name`;
Populate table with data from a table in another database:
INSERT INTO `dst_database`.`table_name` SELECT * FROM `src_database`.`table_name`;
Note that these two statements are not supported by all MySQL Engine types though. InnoDB being one of them in MySQL ver 5.x