Updated on 2024-11-30 GMT+08:00

Checking the Database Compatibility Type

Check the compatibility type of the destination database. If the database type is incompatible, data may contain garbled characters or the synchronization may fail.

Failure Cause

  • During synchronization from MySQL to GaussDB(DWS), the migration of tables without primary keys and empty strings does not support the Oracle (ORA) compatibility mode of GaussDB(DWS).
  • During synchronization from MySQL to GaussDB, the destination database is incompatible with MySQL.

Handling Suggestion

  • Use the MySQL and Teradata compatibility mode of GaussDB(DWS) or add primary keys to tables that do not have primary keys.

    Run the following statement to add a primary key to the table:

    CREATE DATABASE mysql_compatible_db DBCOMPATIBILITY 'MYSQL';

    Or: CREATE DATABASE td_compatible_db DBCOMPATIBILITY 'TD';

  • Use a destination GaussDB instance that is compatible with MySQL.

    If the destination instance is a distributed instance, run the following statement to create a compatible database: CREATE DATABASE mysql_compatible_db DBCOMPATIBILITY 'MYSQL';

    If the destination instance is a primary/standby instance, run the following statement to create a compatible database: CREATE DATABASE mysql_compatible_db DBCOMPATIBILITY 'B';