Yes, TiCDC is a component of TiDB used to capture real-time changes in the TiDB cluster and transmit them to other systems. Here are the detailed steps to deploy TiCDC in a TiDB cluster:
- Configure SSH Mutual Trust and Passwordless Sudo Permissions
Configure SSH mutual trust and passwordless sudo permissions between the TiUP control machine and the TiCDC host. For specific operations, please refer to the SSH Mutual Trust and Sudo Configuration in the TiUP official documentation.
- Install TiCDC
Use the TiUP tool to install TiCDC. The specific operations are as follows:
# Install TiCDC
tiup cluster scale-out <cluster-name> \
--cdc <cdc-version> \
--node <cdc-host> \
--ssh <ssh-user>@<ssh-host>:<ssh-port>:/path/to/ssh/key \
--data-dir /path/to/cdc/data
Where <cluster-name>
is the name of the TiDB cluster, <cdc-version>
is the version number of TiCDC, <cdc-host>
is the address of the TiCDC host, <ssh-user>
is the SSH username, <ssh-host>
is the SSH host address, <ssh-port>
is the SSH port number, /path/to/ssh/key
is the path to the SSH private key file, and /path/to/cdc/data
is the path to the TiCDC data directory.
- Configure TiCDC
Create a TiCDC configuration file cdc.yml
on the TiCDC host and configure the relevant parameters of TiCDC. For specific operations, please refer to the Configure TiCDC in the TiCDC official documentation.
- Start TiCDC
Start TiCDC on the TiCDC host. The specific operations are as follows:
# Start TiCDC
tiup ctl:v1.5.0 cdc -- --pd-endpoints=<pd-endpoints> --log-file=/path/to/cdc.log --config=/path/to/cdc.yml
Where <pd-endpoints>
is the PD address of the TiDB cluster, /path/to/cdc.log
is the path to the TiCDC log file, and /path/to/cdc.yml
is the path to the TiCDC configuration file.
- Verify TiCDC
Use the MySQL client to connect to the TiCDC Server on the TiCDC host and execute the following command to verify whether TiCDC is working properly:
mysql> SHOW PROCESSLIST;
If TiCDC is working properly, it will display the status information of the TiCDC Server.
These are the detailed steps to deploy TiCDC in a TiDB cluster. If you need a more detailed operation guide, please refer to the TiUP and TiCDC official documentation.