add: https://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldbcompare.html
测试 shell>
mysqldbcompare --server1=root@localhost emp1:emp2 --run-all-tests
--------------------------------------------------
mysqldbcompare --server1=root:password@127.0.0.1 --server2=root:password@127.0.0.1 --difftype=sql npl2:Server50505 --run-all-tests
# server1 on 127.0.0.1: ... connected.
# server2 on 127.0.0.1: ... connected.
# Checking databases npl2 on server1 and Server50505 on server2
#
# WARNING: Cannot generate SQL statements for these objects.
# Check the difference output for other discrepencies.
--- `npl2`
+++ `Server50505`
@@ -1 +1 @@
-CREATE DATABASE `npl2` /*!40100 DEFAULT CHARACTER SET latin1 */
+CREATE DATABASE `nplServer50505` /*!40100 DEFAULT CHARACTER SET latin1 */
# WARNING: Could not generate changes for {0}. No changes required or not supported difference.
# WARNING: Cannot generate SQL statements for these objects.
# Check the difference output for other discrepencies.
--- `npl2`
+++ `nplServer50505`
@@ -1 +1 @@
-CREATE DATABASE `npl2` /*!40100 DEFAULT CHARACTER SET latin1 */
+CREATE DATABASE `nplServer50505` /*!40100 DEFAULT CHARACTER SET latin1 */
# Defn Row Data
# Type Object Name Diff Count Check
# -------------------------------------------------------------------------
# TABLE host_config pass pass pass
# TABLE host_conn pass pass pass
# TABLE host_conn_key pass pass pass
# TABLE host_vid pass pass pass
# TABLE next_hop pass pass pass
# TABLE property pass pass pass
# Databases are consistent.
#
# ...done
没有评论:
发表评论