I suppose there are two ways how to do this.
the first is manual : DB dump : " SELECT * INTO OUTFILE 'authors090308.sql' FROM authors; "
and then "LOAD DATA INFILE 'authors090308.sql' INTO TABLE authors;"
(you also need to specify some other parameters as to delimiting columns etc.) or by some other "database dump", where data goes into file the way you want. In between you must switch database manually to the second one.
the second is programmatic : with programming language : Then you need to just open two connections to the databases and realize the statements you need. I don't know if it is what you mean, you'd need to be more specific.
Anyway, you need a connection to a DB server, either via mysql client, oracle sql developer, mysql workbench or via mysql adapter/driver of a programming language. What you need, is the "glue" between 2 connections, which is the programming language. It's either a programming language or a file data is dumped into and back again.
I'm sorry but I don't thing there are any other ways of doing this...as to the first way, you can only get the output from a database and either use mysql pager and pipe the output somewhere (a file perhaps), or SELECT * INTO OUTFILE
, mysqldump, mysqlhotcopy etc.