Checking Whether the Source and Destination Database Character Sets Are Consistent
Check whether the source and destination database character sets are consistent. If the character set of the source database is different from that of the destination database, some data may be garbled or inconsistent.
Failure Cause
The character sets of the source and destination databases are inconsistent.
Handling Suggestion
Change the character set of the source or destination database.
- If a MySQL database is used, perform the following operations:
- If the database is a self-managed database, run commands to change the character set.
- Run the following command to check the character set of the database:
SHOW VARIABLES LIKE "character_set_server"\G;
- Modify the character set of the source database server.
SET character_set_server='utf8';
- Run the following command to check the character set of the database:
- If the database is an RDS for MySQL DB instance, modify the character_set_server parameter..
- If the database is a self-managed database, run commands to change the character set.
- If a PostgreSQL database is used, perform the following operations:
- If the database is a self-managed database, run commands to change the character set.
- Run the following command to check the character set of the database:
show server_encoding;
- Modify the character set of the source database server.
set server_encoding='utf8';
- Run the following command to check the character set of the database:
- If the database is an RDS for PostgreSQL DB instance, modify the server_encoding parameter..
For details about how to modify character set parameters for other types of databases, see the usage guide of the corresponding database.
- If the database is a self-managed database, run commands to change the character set.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot