0 Introduction
- mysql database has all kinds of id, in the recent preliminary study flink cdc, debezium, mysql server id, server uuid, gtid, sesion id/connection id and other related concepts, basically have a certain cognition, strike while the iron is hot, record summarized.
summarize
server id = sid of debezium BinaryLogClient
- define
server-id
use forIdentifies the node of the database cluster instanceThe following are some examples of how to prevent chained master-slave and multi-master-multi-slave topologies from leading to infinite loops in SQL statements.
- Configure, View, Use
- [Database] An Introduction to mysql's serverId/serverUuid - Blogspot/Children's Universe
server uuid
- define
server-uuid
parameter does not replace theserver-id
, they have different roles. When the master and slave are synchronized, if the master and slave instances of theserver-uuid
The same will exit with an error.- Relationship between server-uuid and gtid : gtid =
{server-uuid}:{transaction-id}
- Configure, View, Use
- [Database] An Introduction to mysql's serverId/serverUuid - Blogspot/Children's Universe
transaction id = Xid = transaction ID
gtid = {server uuid}:{transaction id}
- define
GTID
Also known asGlobal transaction ID(Global Transaction ID
)- Used to replace the traditional master-slave replication of the past (ie: asynchronous replication based on binlog and position).
- View, Use
- [Database] MYSQL's Binlog Overview - Blogspot/Children's World
connection id = information_schema. = session id = cid of debezium BinaryLogClient = thread id of debezium BinaryLogClient
- define
- Database connection id (connection id) = session id (session id)
- = information_schema.
- = cid for debezium BinaryLogClient
- = thread id of debezium BinaryLogClient
> select connection_id() as session;
45730
> SELECT * FROM information_schema.processlist limit 10;
+-------+--------+-----------------------+---------------+---------+------+-------+------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+-------+--------+-----------------------+---------------+---------+------+-------+------+
| 45730 | kkuser | 192.168.0.2:50753 | landray_kk_db | Sleep | 2 | | NULL |
...
- View, Use
- Using SHOW PROCESSLIST Command | [Database] Troubleshooting MySQL Locked Table Situations and Solution Ideas - Blogspot/Children's World
Y Recommended Literature
- [Database] An Introduction to mysql's serverId/serverUuid - Blogspot/Children's Universe
- Experiment : Flink CDC listens to mysql table data incremental synchronization - Blogspot/Children's Universe
- [Database] MYSQL's Binlog Overview - Blogspot/Children's World
X References
not have