Example Execution

shell> mysqldbcompare --server1=root:root@localhost:13001 --server2=root:root@localhost:13002 \
          menagerie -a --difftype=SQL --show-reverse --quiet 
# Checking databases menagerie on server1 and menagerie on server2

# Row counts are not the same among `menagerie`.`pet` and `menagerie`.`pet`.
# Transformation for --changes-for=server1:

DELETE FROM `menagerie`.`pet` WHERE `pet_num` = '10';
DELETE FROM `menagerie`.`pet` WHERE `pet_num` = '12';
INSERT INTO `menagerie`.`pet` (`pet_num`, `name`, `owner`, `species`, `sex`, `birth`, `death`)
  VALUES('11', 'Violet', 'Annette', 'dog', 'f', '2010-10-20', NULL);

# Transformation for reverse changes (--changes-for=server2):
# DELETE FROM `menagerie`.`pet` WHERE `pet_num` = '11';
# INSERT INTO `menagerie`.`pet` (`pet_num`, `name`, `owner`, `species`, `sex`, `birth`, `death`) 
#   VALUES('10', 'JonJon', 'Annette', 'dog', 'm', '2010-10-20', '2012-07-01');
# INSERT INTO `menagerie`.`pet` (`pet_num`, `name`, `owner`, `species`, `sex`, `birth`, `death`) 
#   VALUES('12', 'Charlie', 'Annette', 'dog', 'f', '2010-10-20', NULL);

Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
EPUB - 292.9Kb
HTML Download (TGZ) - 224.3Kb
HTML Download (Zip) - 236.0Kb
User Comments
Sign Up Login You must be logged in to post a comment.