This topic describes how to import data from MyCAT to PolarDB-X 1.0.

Migration process

StepDescription
Step 1: Obtain evaluation suggestions

You can use the evaluation suggestion feature of PolarDB-X 1.0 to analyze your MyCat configuration file. You can use the feature to convert the MyCAT sharding function into a sharding method that matches PolarDB-X 1.0 to the greatest extent possible. You can also use the feature to evaluate the required PolarDB-X 1.0 instance type and the ApsaraDB RDS for MySQL instance type of your database and generate an evaluation suggestion report for your reference based on your submitted business information.

Step 2: Import data

You can use one of the following methods to import data from MyCat to PolarDB-X 1.0:

  • Evaluation-based import: An integrated migration solution is provided to create databases, create tables, and import data based on the evaluation and recommendations.
  • Custom import: You can also purchase PolarDB-X 1.0 and ApsaraDB RDS for MySQL instances based on your business requirements, create databases and tables, and then import data from MyCat to the PolarDB-X 1.0 database.

Step 1: Obtain evaluation suggestions

  1. Log on to the PolarDB for Xscale console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. In the left-side navigation pane, choose Evaluation import > Suggestions.
  4. In the upper-right corner of the Suggestions page, click Start MyCat assessment.
    Start evaluation
  5. On the MyCat information page, enter or upload MyCat configuration files, such as schema.xml, rule.xml, and server.xml, and business information, and click Next.
    Note All MyCat configuration files are used to only generate DDL statements and evaluate the MyCat data that you want to import.
  6. On the Task preview page, click Start task when the Precheck Result displays Success.
    Note Make sure that the database endpoint in your server.xml file can connect to the Internet. Otherwise, the precheck process may fail.
  7. After the evaluation task is completed, perform the following steps:
    Evaluation is completed
    • You can click Assessment Report in the Operation column to view evaluation details.
    • You can click Start Import in the Operation column to import data.

Step 2: Import data

You can use one of the following methods to import data from MyCat to PolarDB-X 1.0:

  • Evaluation-based import
    1. Log on to the PolarDB for Xscale console.
    2. In the top navigation bar, select the region where your instance is deployed.
    3. In the left-side navigation pane, choose Evaluation import > Suggestions.
    4. On the page that appears, find the task and click Start Import in the Operation column. Import icon
    5. Configure the required parameters to complete data import.
  • Custom import
    1. Log on to the PolarDB for Xscale console.
    2. In the top navigation bar, select the region where your instance is deployed.
    3. In the left-side navigation pane, choose Evaluation import > Data import.
    4. On the Import tasks page, click MyCat custom import in the upper-right corner.
    5. Configure the required parameters to complete custom import.