mysqldiff比较数据库之间差别

  1. 比较数据库
mysqldiff --server1=root:pass@192.168.1.xxx:3306 --server2=root:pass@192.168.1.xxx:3306 db1:db2
# WARNING: Using a password on the command line interface can be insecure.
# server1 on 192.168.1.xxx: ... connected.
# server2 on 192.168.1.xxx: ... connected.
# WARNING: Objects in server1.iot_brain but not in server2.db2:
#        TABLE: bi_report
#        TABLE: event_record
#        TABLE: bind
#        TABLE: bi_report2
# WARNING: Objects in server2.iot3 but not in server1.db1:
#        TABLE: device_copy
Compare failed. One or more differences found.
  1. 比较表
mysqldiff --server1=root:pass@192.168.1.xxx:3306 --server2=root:pass@192.168.1.xxx:3306 db1.table1:db2.table2 --skip-table-options
# WARNING: Using a password on the command line interface can be insecure.
# server1 on 192.168.1.xxx: ... connected.
# server2 on 192.168.1.xxx: ... connected.
# Comparing db1.table1 to db2.table2            [PASS]
# WARNING: Table options are ignored and differences were found:
# --- idb1.table1
# +++ db2.table2
# @@ -1,4 +1,4 @@
#  ENGINE=InnoDB
# -AUTO_INCREMENT=137
# +AUTO_INCREMENT=2896
#  DEFAULT
#  CHARSET=utf8
Success. All objects are the same.
  1. 问题解决
-bash: !@192.168.1.xxx: event not found

字符’!‘需要前添加转义符号’\’

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值