Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18769

MySQL Utilities mysqldbcompare

$
0
0

Need to copy a database from another server to another and make certain that the two are identical? The previous blog entry was a quick into to mysqldbcopy from the MySQL Utilities. This time we use mysqldbcompare to double check on the database we just copied. This is a very quick way to copy a database from a master to a slave or from production to a test server.

$ mysqldbcopy --force --source=root@10.0.0.18 --destination=root@@localhost davestuff:davestuff
# Source on 10.0.0.18: ... connected.
# Destination on localhost: ... connected.
# Copying database davestuff renamed as davestuff
# Copying TABLE davestuff.a
# Copying GRANTS from davestuff
# Copying data for TABLE davestuff.a
#...done.
$mysqldbcompare -a --server1=root@10.0.0.18 --server2=root@localhost davestuff:davestuff
# server1 on 10.0.0.18: ... connected.
# server2 on localhost: ... connected.
# Checking databases davestuff on server1 and davestuff on server2
#
# Defn Row Data
# Type Object Name Diff Count Check
# -------------------------------------------------------------------------
# TABLE a pass pass pass

Databases are consistent.
#
# ...done



PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18769

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>