Migrating data is never easy. Luckily, IBM Cloud has helped solve this issue with the IBM Data Connect service. IBM Data Connect is a fully managed, data preparation and data integration service. In this how-to guide, we will use one of IBM Data Connect’s key features, its ability to migrate data from two endpoints.
This tutorial will demonstrate how to:
- Use IBM’s Data Connect service to migrate data from a MySQL database to a Cloudant NoSQL database on IBM Cloud.
- An existing MySQL database that you would like to migrate to Cloudant on IBM Cloud.
- An IBM Cloud account
- A provisioned Cloudant NoSQL instance
- A provisioned IBM Data Connect instance
It will take less than 30 minutes to complete this how-to; however, to completely migrate all data from the source database to the target database will depend on your network throughput.
Creating connections in IBM’s Data Connect
Create an instance of IBM’s Data Connect service in IBM Cloud, and launch the service’s dashboard.
Upon launching the service, select the Connections option in the menu, and begin to create a new one by clicking the Create New button. There will be many options for data connections, select the MySQL option.
Provide the following information about your MySQL database: hostname or IP address, port, database name, username, password. Give the connection a memorable name and description and select Create Connection.
If you haven’t done so already, create a Cloudant NoSQL instance in IBM Cloud.
Now we will create another connection to the new Cloudant database. The steps will be similar to those in step 2, except we will select IBM Cloudant this time. Additionally, we will provide the following information: Cloudant URL, username and password. These can be retrieved by viewing the Cloudant service and selecting the Service credentials tab.
We now have the source and target database connections established in IBM’s Data Connect service. Time to start migrating our data!
Migrating data between connections
From the IBM Data Connect dashboard, select the Refine & Copy option on the left menu. This will bring up a set of panels that begin the migration process.
Choose the source database you want to migrate, in this case the MySQL one.
Select the tables and views that are to be migrated and click Copy to Target.
Choose the target database, in this case the Cloudant one and click Run.
This process can take seconds, minutes or hours depending on the size of the database and internet speed. When the process is completed, the data will be successfully migrated to the Cloudant service.
Congratulations! You now know how to migrate a database to IBM Cloud using IBM Data Connect. IBM Data Connect has many options for data sources, data preparation, shaping data, and moving data, be sure to try out these other features!