How to Modify the Default Database Collation in TiDB?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIDB 如何修改默认的数据库编码排序规则?

| username: TiDBer_35zSP0Ow

[TiDB Usage Environment] Production Environment / Testing / PCO
[TiDB Version]
[Encountered Problem]
In MySQL, you can modify the configuration file with:
collation-server = utf8mb4_general_ci

However, this configuration is not available in the TiDB configuration file.

Modifying it through SQL also does not take effect:

set @@global.collation_server='utf8mb4_general_ci';

[Reproduction Path] Operations performed that led to the issue
[Problem Phenomenon and Impact]

[Attachments]

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: Billmay表妹 | Original post link

Refer to this~
If this configuration is not available, it might not be supported~

| username: 张雨齐0720 | Original post link

Check the corresponding version bug fixes

    • Fixed the issue where if the character set specified by character_set_server and collation_server is not specified in the CREATE SCHEMA statement, the new table structure does not use the character set specified by character_set_server and collation_server #27214bold example

Detailed explanation:

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.