-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
c2648c4
commit bc0189e
Showing
3 changed files
with
4 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,43 +86,9 @@ Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it | |
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. | ||
``` | ||
|
||
If the downstream is a special MySQL environment (a public cloud RDS or some MySQL derivative versions) and importing the time zone using the above method fails, you need to specify the MySQL time zone of the downstream using the `time-zone` parameter in `sink-uri`. You can first query the time zone used by MySQL: | ||
If the downstream is a special MySQL environment (a public cloud RDS or some MySQL derivative versions) and importing the time zone using the preceding method fails, you can use the default time zone of the downstream by setting `time-zone` to an empty value, such as `time-zone=""`. | ||
|
||
1. Query the time zone used by MySQL: | ||
|
||
{{< copyable "sql" >}} | ||
|
||
```sql | ||
show variables like '%time_zone%'; | ||
``` | ||
|
||
``` | ||
+------------------+--------+ | ||
| Variable_name | Value | | ||
+------------------+--------+ | ||
| system_time_zone | CST | | ||
| time_zone | SYSTEM | | ||
+------------------+--------+ | ||
``` | ||
|
||
2. Specify the time zone when you create the replication task and create the TiCDC service: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
```shell | ||
cdc cli changefeed create --sink-uri="mysql://[email protected]:3306/?time-zone=CST" --server=http://127.0.0.1:8300 | ||
``` | ||
|
||
> **Note:** | ||
> | ||
> CST might be an abbreviation for the following four different time zones: | ||
> | ||
> - Central Standard Time (USA) UT-6:00 | ||
> - Central Standard Time (Australia) UT+9:30 | ||
> - China Standard Time UT+8:00 | ||
> - Cuba Standard Time UT-4:00 | ||
> | ||
> In China, CST usually stands for China Standard Time. | ||
When using time zones in TiCDC, it is recommended to explicitly specify the time zone, such as `time-zone="Asia/Shanghai"`. Also, make sure that the `tz` specified in TiCDC server configurations and the `time-zone` specified in Sink URI are consistent with the time zone configuration of the downstream database. This prevents data inconsistency caused by inconsistent time zones. | ||
|
||
## How do I handle the incompatibility issue of configuration files caused by TiCDC upgrade? | ||
|
||
|