TICDC Error When Syncing from TiDB to MySQL

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

Original topic: TICDC 从TIDB向MYSQL同步报错

| username: 末0_0想

[TiDB Usage Environment] Test
[TiDB Version] v6.5.0
[Reproduction Path]

tiup cdc cli changefeed create --server= --sink-uri="mysql://root:jczc_app10@" --changefeed-id="simple-replication-task"


tiup cdc cli changefeed create --pd= --sink-uri="mysql://root:jczc_app10@" --changefeed-id="replication-task-1" --sort-engine="unified"

When using the above statements to synchronize data from TiDB to MySQL in real-time, an error occurs. Please help to check the reason. Does the server deploying cdc need to install MySQL?

Error: [CDC:ErrMySQLConnectionError]fail to open MySQL connection: Error 1045: Access denied for user 'root'@'' (using password: YES)

[Resource Configuration] [Attachment: Screenshot/Log/Monitoring]

| username: xfworld | Original post link

mysql cannot be accessed? Please check the environment and MySQL authorization configuration.

| username: 末0_0想 | Original post link

The downstream configuration is appropriate. I have connected using Navicat with root permissions, and it is also fully accessible. The strangest thing is that it reports an error:

Access denied for user 'root'@'' (using password: YES)

This server is where I installed CDC, and my downstream server address is 104.161.

Do you mean that I need to install MySQL on the server where CDC is located?
I checked the official documentation, and it doesn’t mention installing MySQL: 创建 Changefeed - 同步数据到 MySQL 兼容的数据库 - 《TiDB v6.5 中文文档》 - 书栈网 · BookStack

I configured the account and password for 161, but the error message indicates that the MySQL account password on the CDC machine is incorrect.

| username: hey-hoho | Original post link

Check if the root user of your downstream MySQL has restricted login IPs.

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

Check if there are any special characters in the password that were not recognized.

| username: 末0_0想 | Original post link

Will restricting the IP of the downstream root affect synchronization? I am not using root for data synchronization.

| username: 末0_0想 | Original post link

There are no special characters. The image above has a password. It can be seen.

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

This means that the MySQL at needs to allow login from using the root:jczc_app10 credentials.

SELECT * FROM mysql.user a WHERE a.user='root';

First, check if there is an IP and user that can log in — % is also acceptable.

create user root@'' IDENTIFIED WITH mysql_native_password BY 'jczc_app10';

If it still doesn’t work, try creating a new user.

| username: TiDBer_pkQ5q1l0 | Original post link

You have restricted IP access. Grant access permissions to the TiCDC IP range in MySQL.

| username: 孤君888 | Original post link

It’s obviously a permissions issue.

| username: 末0_0想 | Original post link

Do you mean that must have MySQL installed?

| username: 末0_0想 | Original post link

I don’t understand, does ticdc require a MySQL client or server to synchronize data to downstream MySQL? Is that why it needs permissions?

What confuses me is that I haven’t installed MySQL on, but it still prompts me that I have insufficient permissions.

| username: maokl | Original post link

There is an issue with the account password.

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

There is no need to install MySQL. The prompt indicates that there is insufficient permission or incorrect password for to access the downstream MySQL.

| username: 末0_0想 | Original post link

Thank you, everyone! Indeed, after I deleted and recreated the downstream MySQL user, the system can synchronize normally.

| username: system | Original post link

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