Skip to main content

Step-by-Step Guide to Quickly Migrate MySQL Data

This article introduces how to migrate data from a MySQL database to another MySQL database using NineData's data replication feature, starting from scratch.

Please select your scenario to jump to the operation steps that suit you:

Step One: Register for a NineData Account

  1. Open the NineData Registration Page. registration

  2. Enter your phone number and click Get Verification Code, then enter the verification code sent by the NineData system after receiving it.

    tip

    Only phone numbers from Mainland China are currently supported. If you are using a phone number outside the +86 area, you can only receive the verification code via email.

  3. Enter your username and password.

    tip

    The password strength requirements are as follows:

    • The password can contain English letters, numbers, and special characters.

    • Length is 8~16 characters.

    • Must contain both English letters and numbers.

    • Cannot contain empty characters (spaces).

  4. Enter your email and company name, read the Terms of Service and Privacy Policy carefully, then check the box in front of I have read and agree, and click Sign up.

    tip

    If you have already entered your email in the above steps, you do not need to enter it again.

Step Two: Log in to NineData

  1. Open the NineData Login Page. login

  2. You can choose to log in via Password Login, Code Login, Login With SSO, or Login with WeChat .

    • Password Login: Enter the phone number or email used during registration, and enter the password, then click Login.

      tip
      • If you are using a phone number outside the +86 area, you cannot log in via phone number at the moment. Please use the email you registered with to log in.
      • If you have forgotten your login password, you can click Forgot Password in the lower right corner to Reset Password.
    • Code Login Click Code Login, enter the phone number used during registration, click Get Code, and enter the verification code sent by the NineData system, then click Login.

      tip

      If you are using a phone number outside the +86 area, please enter the email you registered with to receive the verification code.

    • Login With SSO: Log in to NineData via SSO. For more information, please refer to Log in to NineData via SSO.

    • Login with WeChat : Log in to NineData by scanning the WeChat QR code.

Step Three: Apply for Two Test Data Sources

  1. In the NineData console, click on the left navigation bar Datasource> Datasource, and click Apply Datasource on the page.

    tip

    New users can also click Apply Datasource on the Home page after logging in. This entry is only displayed when the current user or organization has not added any data sources.

  2. On the Get Free Datasource page, select the number of data sources under Application Qty., up to 2.

  3. Click Apply Demo to complete the application for a free data source, and you will be redirected to the SQL Console page of the data source. The system will start importing the test dataset, which will take about 30 seconds. After the import is complete, the SQL Console will prompt Demo dataset imported successfully!.

    tip

    You can also click the download icon in the upper right corner of the SQL Console page, and click OK to manually import the test dataset.

Step Four: Create a Replication Task

  1. In the NineData console, click on the left navigation bar Replication.

  2. On the Replication page, click Create Replication in the upper right corner.

  3. On the Source & Target tab, configure according to the table below, and click Next.

    Parameter
    Description
    NameEnter the name of the data synchronization task. To facilitate subsequent searching and management, please use a meaningful name. Up to 64 characters are supported.
    SourceSelect 01-ninedata-sample-datasource.
    TargetSelect 02-ninedata-sample-datasource.
    Replication ModeKeep the default state, i.e., select Uni-directional.
    TypeKeep the default state, i.e., select Schema and Full.
    Target Table PreparationKeep the default state, i.e., select Pre-Check Error and Stop Task.
  4. On the Objects tab, select the database (in this example, sample_employees_4262) that needs to be replicated in Source Object, click the right icon to add it to Target Object, and then click Next.

  5. On the Mapping tab, click Save and Pre-Check.

  6. On the Pre-check tab, wait for the system to complete the pre-inspection, check Enable data consistency comparison, and then click Launch.

    tip
    • If the pre-inspection does not pass, you need to click Details in the Actions column on the right side of the target inspection item, investigate the cause of the failure, manually fix it, and then click Check Again to re-execute the pre-inspection until it passes.
    • Inspection items with Result as Warning can be fixed or ignored according to the situation.
  7. On the Launch page, you will be prompted with Launch Successfully, click View Details to view the execution of each stage of the synchronization task.

Step Five: View the Comparison Results of the Source and Target Data Sources

After the replication task is executed, you need to compare the data on both ends to ensure the consistency of the data after migration with the data in the source.

  1. On the Details page, click the Comparison tab.

  2. You can switch the comparison results of the table structure and data by clicking the Schema Comparison or Data Comparsion button.