10.2.38 MySQLConnection.connection_id Property

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