mysqldiff该工具是官方mysql-utilities工具集的一个脚本,可以实现主从服务器表结构是否一致。数据校验需要使用percona的pt-table-checksum工具。 安装: #tarzxvfmysql-utilities-1.5.4.tar.gz#cdmysql-utilities-1.5.4#pythonsetup.pyinstall 使用方法: m
mysqldiff该工具是官方mysql-utilities工具集的一个脚本,可以实现主从服务器表结构是否一致。数据校验需要使用percona的pt-table-checksum工具。
安装:
# tar zxvf mysql-utilities-1.5.4.tar.gz # cd mysql-utilities-1.5.4 # python setup.py install
使用方法:
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.很直观的找出不一样的地方。
该软件是以ecshop作为核心的仿制万表网的商场网站源码。万表网模板 2015最新版整体简洁大气,功能实用,是一款时尚典雅的综合类模板!样式精美的商品分类树,层次分明,分类结构一目了然。首页轮播主广告分别对应切换小广告,商品宣传更到位。独家特色增加顶级频道页面、品牌页面,以及仿京东对比功能,提升网站档次,让您的网站更加高端大气!并且全站采用div+css布局,兼容性良好,更注重页面细节,增加多种j
如果你想打印出修改表结构的语句,如下:
# 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.









