Help for this page

Select Code to Download


  1. or download this
    $ mysqldump --add-drop-table -h host1 db1 | mysql -h host2 db2
    
  2. or download this
    # copies the target data without the structure. Creates a
    # complete SQL statement including all the field names.
    ...
    
    # reinserts the data
    $ mysql -h host2 db2 < db2.sql
    
  3. or download this
    $ ./dbdiff host1 db1 host2 db2
    $ ./dbdiff host2 db2 host1 db1
    
  4. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    $dbh1->disconnect();
    $dbh2->disconnect();
    
  5. or download this
     _  _ _  _  
    (_|| | |(_|><
     _|