MySQL Lists are EOL. Please join:

List:MySQL and .NET« Previous MessageNext Message »
From:Barry Zubel Date:August 29 2006 8:21am
Subject:Re: From development database to the live one.
View as plain text  
Well, it depends on how you need to merge the data.

If you have no problems with denying access to the live site for a short 
period of time, and losing the data in the live site you can do:

mysqldump --opt -Q -u youruser -p yourdevdatabasename > yourdb.sql
mysql -u youruser -p
drop database yourlivedatabase;
create database yourlivedatabase;
use yourlivedatabase;
source yourdb.sql;

If you must maintain the site "live", then you'll need to use something 
along the lines of mysqldiff (  to compare 
changes between development and live, issue a query to bring live 
up-to-date regarding structure, then use something like:

mysqldump --opt -u youruser -p -t yourdevdatabasename > yourdb.sql
(the -t suppresses the table creation information)

You will still have to devise a way of keeping any duplicate records in 

These ideas should at least give you a starting point to consider.


Richard Heesbeen wrote:
> He All,
> A newbie question for you all, what is the best way to get my development database to
> the live server (it has a few million records)?
> Thanks,
> Richard.
> --
> This email has been verified as Virus free
> Virus Protection and more available at
From development database to the live one.Richard Heesbeen29 Aug
  • Re: From development database to the live one.Barry Zubel29 Aug