Help Center> Data Replication Service> Troubleshooting> Solutions to Failed Check Items> Database Parameters> Checking Whether the Source and Destination Database Character Sets Are Consistent
Updated on 2024-03-27 GMT+08:00

Checking Whether the Source and Destination Database Character Sets Are Consistent

MySQL Migration

Table 1 Checking whether the source and destination database character sets are consistent

Check Item

Whether the source and destination database character sets are consistent

Description

Check whether the character sets of the servers hosting the source and destination databases are consistent.

Failure Cause and Handling Suggestion

Failure cause: This item cannot be checked because the source database fails to be connected.

Handling suggestion: Check whether the source database is connected.

Failure cause: This item cannot be checked because the destination database fails to be connected.

Handling suggestion: Check whether the destination database is connected.

Failure cause: Insufficient user permissions

Handling suggestion: Check whether the database user permissions meet the migration requirements.

Failure cause: The character set of the source database is inconsistent with that of the destination database.

Handling suggestion: Modify the character sets.

Run commands to modify the self-created source database.

  1. Check whether source and destination database character sets are consistent.
    show variables like "character_set_server"\G;

  2. Modify the character set of the source database server.
    set character_set_server='utf8';

MySQL -> PostgreSQL Synchronization

Table 2 Checking whether the source and destination database character sets are consistent

Check Item

Whether the source and destination database character sets are consistent

Description

Check whether the character sets of the servers hosting the source and destination databases are consistent.

Failure Cause and Handling Suggestion

Failure cause: The character set of the source database is inconsistent with that of the destination database.

Handling suggestion: Change the character set character_set_server of the source database to the same as that of the destination database, or change the character set server_encoding of the destination database to the same as that of the source database.