1. 安装软件
a.(https://dev.mysql.com/downloads/connector/python/)
brew cask install mysql-connector-python
b.(https://downloads.mysql.com/archives/utilities/)
brew cask install mysql-utilities
2. 比较两个数据库的方法(可以比较两个数据库表的差别)
mysqldiff --server1=user:pass@host:port:socket --server2=user:pass@host:port:socket db1:db2
3. 比较两个表的方法,以表1为比较源,以alter sql为输出,结果为表2执行什么语句可以变成表1
mysqldiff --server1=user:pass@host:port:socket --server2=user:pass@host:port:socket --changes-for=server2 --difftype=sql db1.table:db2.table
4.安装的mysql工具包括如下,有时间自己尝试:
mysqlauditadmin
mysqlauditgrep
mysqldbcompare
mysqldbcopy
mysqldbexport
mysqldbimport
mysqldiff
mysqldiskusage
mysqlfabric
mysqlfailover
mysqlfrm
mysqlindexcheck
mysqlmetagrep
mysqlprocgrep
mysqlreplicate
mysqlrpladmin
mysqlrplcheck
mysqlrplms
mysqlrplshow
mysqlrplsync
mysqlserverclone
mysqlserverinfo
mysqluc
mysqluserclone