Example of Migrating From MySQL
MySQL JDBC Driver Information
To access MySQL download and install the appropriate driver.
Supported Driver |
|
Class Name |
|
JDBC URL |
|
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
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
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