question about MySQL database migration

Posted by WilliamLou on Stack Overflow See other posts from Stack Overflow or by WilliamLou
Published on 2010-04-20T21:11:14Z Indexed on 2010/04/20 21:13 UTC
Read the original article Hit count: 307

Filed under:
|
|

Hi there: If I have a MySQL database with several tables on a live server, now I would like to migrate this database to another server. Of course, the migration I mean here involves some database tables, for example: add some new columns to several tables, add some new tables etc.. Now, the only method I can think of is to use some php/python(two scripts I know) script, connect two databases, dump the data from the old database, and then write into the new database. However, this method is not efficient at all. For example: in old database, table A has 28 columns; in new database, table A has 29 columns, but the extra column will have default value 0 for all the old rows. My script still needs to dump the data row by row and insert each row into the new database.

Is there any tools or a better method than writing a script yourself? Here, I dont need to worry about multithread writing problems etc.., I mean the old database will be down (not open to public usage etc.., only for upgrade ) for a while.

Thanks!!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database