[thelist] MySQL: transfer data to table with different structure?

Fred Jones fredthejonester at gmail.com
Sun Mar 9 13:36:47 CDT 2008


> No need to recreate that wheel -- it's called 'mysqldump'  :-)
> 
> Then just search/replace all the table names in that dump file and
> you're ready to re-import.

Potentially true. I noted that the original post said "essentially the 
same" meaning not necessarily precisely the same schema. But if indeed 
the fields match one to one, then certainly a simple dump is far easier, 
using whatever tool you use to interface with MySQL, be it the command 
line, phpMyAdmin or a GUI. Then replace table names and field names as 
necessary. Be sure NOT to recreate your old tables, however--just do a 
dump of the data, not the table structure.

Fred



More information about the thelist mailing list