List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:July 9 2008 9:07pm
Subject:Re: Duplicating tables - mysqldump or mysqlpp or?
View as plain text  
2008/7/9 William Pettersson:
> I've got the app itself working, and querying the local database, so I just
> need to work on the synchronising bit.  I can either use mysqldump (easy,
> dirty shell command), or pull info in with mysql++, rewrite the output as an
> insert statement, and then reinsert with mysql++.  I don't want to waste too
> much time, so if mysql++ method is going to be too hard, I'll just fall back
> to mysqldump.

If the app only reads the database, and doesn't write to it (so you
don't need to merge anything back into the remote DB) I would
definitely go for mysqldump. It will lock the remote DB, take a
snapshot, and insert it painlessly.  If there are any changes to the
table structures you will pick them up too. If you write it manually
you might have to change the code if the remote DB changes, or make it
smart and check for that ... but someone already wrote a program to do
it, called mysqldump :-)

Jonathan
Thread
Duplicating tables - mysqldump or mysqlpp or?William Pettersson9 Jul
  • Re: Duplicating tables - mysqldump or mysqlpp or?Warren Young9 Jul
  • Re: Duplicating tables - mysqldump or mysqlpp or?Jonathan Wakely9 Jul
  • RE: Duplicating tables - mysqldump or mysqlpp or?Paul Martin9 Jul
Re: Duplicating tables - mysqldump or mysqlpp or?William Pettersson9 Jul