#!/usr/bin/env perl use strict; use warnings; @ARGV == 2 or die 'Usage: mysqldiff dbname1 dbname2'; my @tables = map { my $scheme; if (-e $_) { # file my $create_table = slurp($_); my $tmp_dbname = join '_', 'tmp', time(); system(qw/mysqladmin -uroot create/, $tmp_dbname); system('mysql', '-uroot', $tmp_dbname, '-e', $create_table); my @cmd = (qw/mysqldump -uroot --no-data=true/, $tmp_dbname); $sc