Every connection has an ID that is unique among the set of currently connected clients.
mysql>
mysql> SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 37 |
+-----------------+
1 row in set (0.00 sec)
mysql>
20.6.CONNECTION_ID |
| 20.6.1. | CONNECTION_ID() returns the connection ID (thread ID) for the connection. |