原文来自(大胖博客)
1. 安装软件
a.(https://dev.mysql.com/downloads/connector/python/)
[shell]
brew cask install mysql-connector-python
[/shell]
b.(https://downloads.mysql.com/archives/utilities/)
[shell]
brew cask install mysql-utilities
[/shell]
2. 比较两个数据库的方法(可以比较两个数据库表的差别)
[shell]
mysqldiff --server1=user:pass@host:port:socket --server2=user:pass@host:port:socket db1:db2
[/shell]
3. 比较两个表的方法,以表1为比较源,以alter sql为输出,结果为表2执行什么语句可以变成表1
[shell]
mysqldiff --server1=user:pass@host:port:socket --server2=user:pass@host:port:socket --changes-for=server2 --difftype=sql db1.table:db2.table
[/shell]
4.安装的mysql工具包括如下,有时间自己尝试:
mysqlauditadm