Check out sqlyog. (www.sqlyog.com) It has a structure sync tool. After making the first change, you could generate a script to make the change to the next database and then take that script and parameterize it so that a PHP script could use it to update all of your database.

HOWEVER,

A better way to do this may be to re-think your entire schema. Instead of keeping the data in separate but identical databases, put it all in one database but add a key (owner, database, etc) to each table. Then in your selects, simply add to your where clause "AND ownerID=x". This way you only have 1 database but your data is kept separate. (Until MySQL comes out with views, then it gets a lot easier.)

HTH,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.


Steve Buehler wrote:
I am running PHP/MySQL for a program that I am writing. We will have 100's or 1000's of databases that will be duplicates in structure. The problem is when I make a change to the database, I have to go to every database manually and make the change. All of the databases start with "a_" and are on the same server. I would like to be able to have one master database and then run a script when I make a change to it that will get the structure of the master database and check all of the other databases to make sure that their structures match. If not, it will make the change to the other databases. Does anybody know if there is all ready a program out there that would do this? Can anybody point me in the right direction? Or if it is only a few lines of script that somebody all ready has to do this, can you share it?

Thank You
Steve




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to