mysqldiff

Posted ༺༽King༼༻

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysqldiff相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

mysqldiff

mysqldiff No module named utilities.common.tools

mysql 能执行diff文件吗

微信小程序代码片段

MySQL Utilities

VSCode自定义代码片段——CSS选择器