EnglishFrenchSpanish

OnWorks favicon

mysql-schema-diffp - Online in the Cloud

Run mysql-schema-diffp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mysql-schema-diffp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


mysql-schema-diff - compare MySQL database schemas

SYNOPSIS


mysql-schema-diff [B<options>] B<database1> B<database2>

mysql-schema-diff --help

DESCRIPTION


mysql-schema-diff is a Perl script front-end to the CPAN <http://www.perl.com/CPAN> module
MySQL::Diff <http://search.cpan.org/search?module=MySQL::Diff> which compares the data
structures (i.e. schema / table definitions) of two MySQL <http://www.mysql.com/>
databases, and returns the differences as a sequence of MySQL commands suitable for piping
into mysql which will transform the structure of the first database to be identical to
that of the second (c.f. diff and patch).

Database structures can be compared whether they are files containing table definitions or
existing databases, local or remote.

N.B. The program makes no attempt to compare any of the data which may be stored in the
databases. It is purely for comparing the table definitions. I have no plans to
implement data comparison; it is a complex problem and I have no need of such
functionality anyway. However there is another program coldiff
<http://rossbeyer.net/software/mysql_coldiff/> which does this, and is based on an older
program called datadiff which seems to have vanished off the 'net.

For PostgreSQL there are similar tools such as pgdiff <http://pgdiff.sourceforge.net/> and
apgdiff <http://apgdiff.startnet.biz/>.

EXAMPLES


# compare table definitions in two files
mysql-schema-diff db1.mysql db2.mysql

# compare table definitions in a file 'db1.mysql' with a database 'db2'
mysql-schema-diff db1.mysql db2

# interactively upgrade schema of database 'db1' to be like the
# schema described in the file 'db2.mysql'
mysql-schema-diff -A db1 db2.mysql

# compare table definitions in two databases on a remote machine
mysql-schema-diff --host=remote.host.com --user=myaccount db1 db2

# compare table definitions in a local database 'foo' with a
# database 'bar' on a remote machine, when a file foo already
# exists in the current directory
mysql-schema-diff --host2=remote.host.com --password=secret db:foo bar

OPTIONS


More details to come; for now run "mysql-schema-diff --help".

INTERNALS


For both of the database structures being compared, the following happens:

· If the argument is a valid filename, the file is used to create a temporary database
which "mysqldump -d" is run on to obtain the table definitions in canonicalised form.
The temporary database is then dropped. (The temporary database is named
"test_mysqldiff_temp_something" because default MySQL permissions allow anyone to
create databases beginning with the prefix "test_".)

· If the argument is a database, "mysqldump -d" is run directly on it.

· Where authentication is required, the hostname, username, and password given by the
corresponding options are used (type "mysql-schema-diff --help" for more information).

· Each set of table definitions is now parsed into tables, and fields and index keys
within those tables; these are compared, and the differences outputted in the form of
MySQL statements.

Use mysql-schema-diffp online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 2
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 3
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 4
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 5
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • 6
    Shadowsocks
    Shadowsocks
    A fast tunnel proxy that helps you
    bypass firewalls This is an application
    that can also be fetched from
    https://sourceforge.net/projects/shadowsocksgui/.
    It ha...
    Download Shadowsocks
  • More »

Linux commands

  • 1
    abidiff
    abidiff
    abidiff - compare ABIs of ELF files
    abidiff compares the Application Binary
    Interfaces (ABI) of two shared libraries
    in ELF format. It emits a meaningful
    repor...
    Run abidiff
  • 2
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 3
    couriertcpd
    couriertcpd
    couriertcpd - the Courier mail server
    TCP server daemon ...
    Run couriertcpd
  • 4
    couriertls
    couriertls
    couriertls - the Courier mail server
    TLS/SSL protocol wrapper ...
    Run couriertls
  • 5
    galleta
    galleta
    galleta - tool to extract information
    from MSIE cookie files ...
    Run galleta
  • 6
    gallina
    gallina
    gallina - extracts specification from
    Coq vernacular files ...
    Run gallina
  • More »

Ad