码迷,mamicode.com
首页 > 数据库 > 详细

mysqldiff

时间:2019-11-03 14:37:36      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:http   for   ide   detail   lin   one   安装   span   stat   

mysqldiff 安装

技术图片
 wget -c http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-utilities-1.5.3.zip
 unzip mysql-utilities-1.5.3.zip
 cd mysql-utilities-1.5.3
 python ./setup.py build
 python ./setup.py install
View Code
mysqldiff --server1=root:MThjN2Y3Zj@10.50.51.57:30306  --server2=root:N2Z3yjMhTj@10.50.51.56:30307  --force --difftype=sql upnp:elink

mysqldiff --server1=root:MThjN2Y3Zj@10.50.51.57:30306  --server2=root:N2Z3yjMhTj@10.50.51.56:30307 upnp.upnp_dmz:upnp.upnp_dmz

https://blog.csdn.net/lanwilliam/article/details/78664620

https://www.cnblogs.com/Yongzhouunknown/p/4856765.html

 

脚本

技术图片
#!/bin/bash 

host1="10.50.51.57"
host2="10.50.51.56"
user1="root"
user2="root"
pass1="MThjN2Y3Zj"
pass2="N2Z3yjMhTj"
port1="30306"
port2="30307"

#mysqldiff --server1=root:MThjN2Y3Zj@10.50.51.57:30306  --server2=root:N2Z3yjMhTj@10.50.51.56:30307 upnp.upnp_dmz:upnp.upnp_status
echo "" >sql.txt
for i in `cat list`;do
    echo "------------------------------------------------------------------------------------" >>sql.txt
    echo $i                                                                                     >>sql.txt
    echo ""                                                                                     >>sql.txt
    echo ""                                                                                     >>sql.txt
    mysqldiff --server1=$user1:$pass1@$host1:$port1  --server2=$user2:$pass2@$host2:$port2 $i:$i >>sql.txt
    echo ""                                                                                     >>sql.txt
    echo ""                                                                                     >>sql.txt
    echo "------------------------------------------------------------------------------------" >>sql.txt
done 
mysqldiff.sh
技术图片
upnp.upnp_dmz
elink.elink_switch
list

 

mysqldiff

标签:http   for   ide   detail   lin   one   安装   span   stat   

原文地址:https://www.cnblogs.com/hanwei666/p/11785962.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!