Synchronization with Hyphenated Database Names

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

Original topic: 带有中划线数据库名称的同步

| username: 考试没答案

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
【Encountered Issue: Issue Symptoms and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】

| username: xfworld | Original post link

No problem, it performs the same as MySQL.

| username: tidb菜鸟一只 | Original post link

Use antonym

| username: 考试没答案 | Original post link

Regarding the legacy issue in MySQL, the database name and table name contain hyphens. How should this be handled?

| username: Raymond | Original post link

For database names and table names with hyphens, you can enclose them in backticks. This is also the way to handle it in MySQL.

| username: 啦啦啦啦啦 | Original post link

If possible, it’s best to use underscores instead of hyphens. If it can’t be changed, then it can only be enclosed in backticks.

| username: 考试没答案 | Original post link

After upgrading tools like dm, dmctl, and tidb to the same version V6.5.0, there are no errors even if there are hyphens.

| username: system | Original post link

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