Migrating From MySQL

MySQL JDBC Driver Information

To access MySQL download and install the appropriate driver.

Supported Driver

Class Name

com.mysql.jdbc.Driver

JDBC URL

jdbc:mysql://host:port/dbname

MySQL Connector/J is an official JDBC Type 4 driver and is a pure Java implementation of the MySQL protocol which does not rely on the MySQL client libraries. For additional information, see MySQL JDBC Driver.

Migration Commands

nuodb-migrator schema

The following sample command generates a NuoDB schema from a MySQL db1 catalog and saves the schema to /tmp/schema.sql:

$ nuodb-migrator schema                                 \
        --source.driver=com.mysql.jdbc.Driver           \
        --source.url=jdbc:mysql://localhost:3306/db1    \
        --source.username=root                          \
        --source.password=12345                         \
        --output.path=/tmp/schema.sql

Run schema.sql in nuosql to load schema into the NuoDB db2 database.

$ nuosql db2@localhost --user cloud --password user --file /tmp/schema.sql

nuodb-migrator dump

To dump tables from the MySQL db1 catalog in CSV format to the /tmp/dump directory execute:

$ nuodb-migrator dump                                   \
        --source.driver=com.mysql.jdbc.Driver           \
        --source.url=jdbc:mysql://localhost:3306/db1    \
        --source.username=root                          \
        --source.password=12345                         \
        --output.type=csv                               \
        --output.path=/tmp/dump

nuodb-migrator load

Restoring a dump to a NuoDB database into --target.schema is performed using nuodb-migrator load:

$ nuodb-migrator load                                   \
        --target.url=jdbc:com.nuodb://localhost/db2     \
        --target.schema=test2                           \
        --target.username=cloud                         \
        --target.password=user                          \
        --input.path=/tmp/dump