9.2.17 Method MySQLConnection.cmd_reset_connection()

Syntax:

cnx.cmd_reset_connection()

Resets the connection by sending a COM_RESET_CONNECTION command to the server to clear the session state.

This method permits the session state to be cleared without reauthenticating. For MySQL servers older than 5.7.3 (when COM_RESET_CONNECTION was introduced), the reset_session() method can be used instead. That method resets the session state by reauthenticating, which is more expensive.

This method was added in Connector/Python 1.2.1.