1
2
3
|
# tar zxvf mysql-utilities-1.5.4.tar.gz # cd mysql-utilities-1.5.4 # python setup.py install |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
mysqldiff --server1=admin:123456@192.168.79.10 --server2=admin:123456@192.168.79.11 --difftype=differ test : test # WARNING: Using a password on the command line interface can be insecure. # server1 on 192.168.79.10: ... connected. # server2 on 192.168.79.11: ... connected. # Comparing `test` to `test` [PASS] # Comparing `test`.`t1` to `test`.`t1` [FAIL] # Object definitions differ. (--changes-for=server1) # CREATE TABLE `t1` ( ` id ` int(11) DEFAULT NULL, - `name` char(4) DEFAULT NULL ? ^ + `name` char(16) DEFAULT NULL ? ^^ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 Compare failed. One or more differences found. |
1
2
3
4
5
6
7
8
9
10
11
12
|
# mysqldiff --server1=admin:123456@192.168.79.10 --server2=admin:123456@192.168.79.11 --difftype=sql test : test # WARNING: Using a password on the command line interface can be insecure. # server1 on 192.168.79.10: ... connected. # server2 on 192.168.79.11: ... connected. # Comparing `test` to `test` [PASS] # Comparing `test`.`t1` to `test`.`t1` [FAIL] # Transformation for --changes-for=server1: # ALTER TABLE ` test `.`t1` CHANGE COLUMN name name char(16) NULL; Compare failed. One or more differences found. |