Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb


MySQL Connector/Python Developer Guide  /  ...  /  MySQLConnection.cmd_reset_connection() Method

10.2.17 MySQLConnection.cmd_reset_connection() Method

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.