MySQL-Diff – Compare two MySQL databases

**MySQL-Diff** is a tool purely for comparing the mysql table definitions. The program makes no attempt to compare any of the data which may be stored in the databases.

### **Installation**

“Automatic” installation via or

Installation from either of the recommended installers can be performed at the
command line, with either of the two following commands:

`$ perl -MCPANPLUS -e ‘install MySQL::Diff’`


`$ perl -MCPAN -e ‘install MySQL::Diff’`

Although is the default installer for many, with the release of Perl
5.10, is now also available in core. However, if you use an earlier
version of Perl, you can install CPANPLUS from the CPAN with the following

`$ perl -MCPAN -e ‘install CPANPLUS’`

### **Usage**

– Compare table definitions in two files

`mysqldiff db1.sql db2.sql`

– Compare table definitions in a file ‘db1.mysql’ with a database ‘db2′

`mysqldiff db1.sql db2`

– Interactively upgrade schema of database ‘db1′ to be like the schema described in the file ‘db2.mysql’

`mysqldiff -A db1 db2.mysql`

– Compare table definitions in two databases on a remote machine

`mysqldiff – –user=myaccount db1 db2`

– Compare table definitions in a local database ‘db1′ with a database ‘db2′ on a remote machine, when a file ‘db1′ already exists in the current directory

`mysqldiff – –password=secret db:db1 db2`


[Project URL]( “Project URL”) [Documentation]( “Documentation”)

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x
Scroll to Top