MySQL Connector/Python Developer Guide / ... / Connector/Python API Reference / connection.MySQLConnection Class / MySQLConnection.disconnect() Method
This method tries to send aQUIT command and close the socket. It raises no exceptions.
MySQLConnection.close() is a synonymous method name and more commonly used.
To shut down the connection without sending aQUIT command first, useshutdown().