Re: Any easier way to compare mysql schema of 50 databases?!
Just use command line tools called fc on windows or diff on linux if you are patient and perfer trouble. On Tue, Oct 7, 2008 at 10:07 PM, Duzenbury, Rich [EMAIL PROTECTED]wrote: I just used mysqldiff for a project, and was successful. -Original Message- From: Uma Bhat [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 7:51 PM To: Andy Shellam; mysql@lists.mysql.com Subject: Re: Any easier way to compare mysql schema of 50 databases?! Thank you all, guys!! i shall try these and respond on which worked best for me. Regards, Uma On 10/6/08, Andy Shellam [EMAIL PROTECTED] wrote: Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- I'm a MySQL DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn
RE: Any easier way to compare mysql schema of 50 databases?!
I just used mysqldiff for a project, and was successful. -Original Message- From: Uma Bhat [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 7:51 PM To: Andy Shellam; mysql@lists.mysql.com Subject: Re: Any easier way to compare mysql schema of 50 databases?! Thank you all, guys!! i shall try these and respond on which worked best for me. Regards, Uma On 10/6/08, Andy Shellam [EMAIL PROTECTED] wrote: Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
Uma Bhat wrote: Hey guys! *MySQL version 5.0* Hence before doing this, *we want to ensure that there is ABSOLUTE *no* difference in schema between each of them. (all datatypes, and other such database objects, engines, MUST be IDENTICAL).* *QUESTION* - what's the *EASIET way to compare* the schema's of ALL these 50 databases ? *WORKAROUND* i could think of - taking *mysqldump* of database (with * --no-data* option) and compare with *'diff'* UNIX command. BUT, this is a VERY TEDIOUS to carry out this process for 50 databases!!! It is not ... a simple shell script will do it for you and can even mail you the results about mismatch. Btw Why don't you consider having a single database replicated across 50 diff machines/servers ? Or is it sharding/partitioning of data across different instances ? Regards, Ranjeet Walunj *Are there any tools available* to accomplish this task? Many Thanks! Uma
Re: Any easier way to compare mysql schema of 50 databases?!
In order to make your workaround less tedious you can write a shell script that dumps the structures of all 50 databases basically: for db in $(mysql [opts] -e 'show databases'); do mysqldump [opts] $db Done Olaf On 10/5/08 10:15 PM, Uma Bhat [EMAIL PROTECTED] wrote: Hey guys! We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. *MySQL version 5.0* *SCENARIO* - There are 50 mysql databases (which we have been informed that is of same schema - we are not sure) We are planning to consolidate the data spread across these 50 databases into a SINGLE database . Hence before doing this, *we want to ensure that there is ABSOLUTE *no* difference in schema between each of them. (all datatypes, and other such database objects, engines, MUST be IDENTICAL).* *QUESTION* - what's the *EASIET way to compare* the schema's of ALL these 50 databases ? *WORKAROUND* i could think of - taking *mysqldump* of database (with * --no-data* option) and compare with *'diff'* UNIX command. BUT, this is a VERY TEDIOUS to carry out this process for 50 databases!!! *Are there any tools available* to accomplish this task? Many Thanks! Uma - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
Thank you all, guys!! i shall try these and respond on which worked best for me. Regards, Uma On 10/6/08, Andy Shellam [EMAIL PROTECTED] wrote: Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Any easier way to compare mysql schema of 50 databases?!
Hey guys! We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. *MySQL version 5.0* *SCENARIO* - There are 50 mysql databases (which we have been informed that is of same schema - we are not sure) We are planning to consolidate the data spread across these 50 databases into a SINGLE database . Hence before doing this, *we want to ensure that there is ABSOLUTE *no* difference in schema between each of them. (all datatypes, and other such database objects, engines, MUST be IDENTICAL).* *QUESTION* - what's the *EASIET way to compare* the schema's of ALL these 50 databases ? *WORKAROUND* i could think of - taking *mysqldump* of database (with * --no-data* option) and compare with *'diff'* UNIX command. BUT, this is a VERY TEDIOUS to carry out this process for 50 databases!!! *Are there any tools available* to accomplish this task? Many Thanks! Uma