Setting client flags with MySQL Connector/Python works a bit differently than the other MySQL Python drivers. This blog post describes how to set and unset flags, like the CLIENT_FOUND_ROWS.
The default client flags for the MySQL Client/Server protocol can be retrieved using the constants.ClientFlag class:
>>> from mysql.connector.constants import ClientFlag >>> defaults = ClientFlag.get_default() >>> print ClientFlag.get_bit_info(defaults) ['SECURE_CONNECTION', 'TRANSACTIONS', 'CONNECT_WITH_DB', 'PROTOCOL_41', 'LONG_FLAG', 'MULTI_RESULTS', 'MULTI_STATEMENTS', 'LONG_PASSWD']
To set an extra flag when connecting to MySQL you use the client_flags argument of connect()-method. For example, you’d like to have the …
[Read more]