it's not PHP, but mysqldiff is a perl tool that would probably give you
the desired results. it can generate the SQL necessary to sync
(sorry if anyone got this in duplicate, i was having probs sending to
the list until i fixed the envelope.)
On Thu, Mar 13, 2003 at 09:16:51PM -0500, John W. Holmes <[EMAIL PROTECTED]> wrote:
> > I'm developing an intranet-based application using PHP and MySQL. We
> > release new versions of our application regularly, and synchronizing
> > structure of the databases is beginning to be a headache.
> > Do any tools exist that would let me sync the structure of two
> > databases? Ideally, I'd like to include a "mysqldump --no-data" (or
> > something analogous) file with each of our releases, and run a script
> > the client's server that would update the structure of their own local
> > database from that file.
> > We're cross-platform (windows, linux, and mac). And, all servers are
> > behind their own firewalls.
> > I'm aware of sqlyog (http://www.webyog.com/sqlyog/download.html), but
> > need something that can be written in php, and works without a "live"
> > connection to the "master" database.
> I don't know of any automatic way to do it. It wouldn't be too hard to
> write a little PHP script that gets the difference between two mysqldump
> files and generates the appropriate ALTER and INSERT queries to bring
> the old database up to date. An exec call do diff might even make it
> easier (I don't know anything about diff, but I'm guessing it could
> help.) Actually, now that I think a little more about it, it would be a
> little hard, but not impossible. :)
> ---John W. Holmes...
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php