9.2.38 Property MySQLConnection.connection_id

This property returns the integer connection ID (thread ID or session ID) for the current connection or None when not connected.