Import from MyCat to PolarDB-X 1.0

Updated at:
Copy as MD

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

Migration process

Step Description
Step 1: Get an evaluation suggestion

The PolarDB-X evaluation suggestion feature analyzes your MyCat configuration file to convert MyCat sharding functions into compatible sharding methods for PolarDB-X. Based on your business information, the feature also recommends an appropriate PolarDB-X instance type and the instance types for the underlying RDS instances, and generates an evaluation report.

Step 2: Import data

You can import data from MyCat to PolarDB-X in one of the following two ways:

  • Evaluation-based import: This method provides a streamlined migration solution that creates databases and tables and imports data based on the evaluation results.
  • Custom import: Alternatively, you can purchase PolarDB-X and RDS instances, create databases and tables, and then import the MyCat data to the target PolarDB-X database.

Step 1: Evaluation suggestion

  1. Log on to the PolarDB-X 1.0 console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. In the left-side navigation pane, click Import Evaluation > Suggestions.
  4. In the upper-right corner of the Suggestions page, click Start MyCat 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 then click Next.
    Note These configuration files are used only for evaluation and to generate DDL statements.
  6. On the Task Precheck page, wait for the Precheck Result to be Successful, and then click Start Task.
    Note Make sure that the database endpoint in your server.xml file is publicly accessible. Otherwise, the precheck may fail.
  7. After the evaluation task is complete, you can:
    • In the Actions column, click Evaluation Report to view the evaluation suggestion details.
    • In the Actions column, click Start Import to start the data import process.

Step 2: Data import

You can import MyCat data into PolarDB-X 1.0 in the following two ways:

  • Evaluation-based import
    1. Log on to the PolarDB-X console.
    2. In the upper-left corner of the page, select the region where your target instance is located.
    3. In the left-side navigation pane, click Import Evaluation > Suggestions.
    4. Find the target evaluation task and click Start Import in the Actions column.
    5. Follow the prompts to complete the data import.
  • Custom import
    1. Log on to the PolarDB-X console.
    2. In the upper-left corner of the page, select the region where your target instance is located.
    3. In the left-side navigation pane, click Import Evaluation > Import Data.
    4. On the Import Task page, click MyCat Custom Import in the upper-right corner.
    5. Follow the prompts to complete the MyCat custom import.