Search Results
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-client-flags.html
Syntax: >>> cnx.client_flags=flags >>> cnx.clieng_flags This property sets the client flags to use when connecting to the MySQL server, and returns the set value as an integer. For example, to unset LONG_FLAG and set the FOUND_ROWS flags: >>> from ...The flags value can be either an integer or a sequence of valid client flag values (see Section 6.9.7, “constants.ClientFlag ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-process-kill.html
Although still available, it is better to use the KILL SQL statement. The following two lines have the same effect: >>> cnx.cmd_process_kill(123) >>> cnx.cmd_query('KILL 123') .
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-query.html
Syntax: cnx.cmd_query(statement) This method sends the given statement to the MySQL server and returns a result. The returned dictionary contains information depending on what kind of query was executed. If the query is a SELECT statement, the ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-quit.html
This method sends a QUIT command to the MySQL server, closing the current connection. Since there is no response from the MySQL server, the packet that was sent is returned.
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-refresh.html
This method flushes tables or caches, or resets replication server information. The options argument should be a bitmask value constructed using constants from the constants.RefreshOption class. Example: >>> from mysql.connector import RefreshOption ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-reset-connection.html
Syntax: cnx.cmd_reset_connection() Resets the connection by sending a COM_RESET_CONNECTION command to the server to clear the session state. For MySQL servers older than 5.7.3 (when COM_RESET_CONNECTION was introduced), the reset_session() method ...This method permits the session state to be cleared without ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-cmd-shutdown.html
Deprecation This MySQL Server functionality is deprecated. Asks the database server to shut down. The connected user must have the SHUTDOWN privilege. Returns a dictionary containing the OK packet information. ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-ping.html
Syntax: cnx.ping(reconnect=False, attempts=1, delay=0) Check whether the connection to the MySQL server is still available. When reconnect is set to True, one or more attempts are made to try to reconnect to the MySQL server, and these options are ...Use the delay argument (seconds) if you want to wait between each ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-reconnect.html
Syntax: cnx.reconnect(attempts=1, delay=0) Attempt to reconnect to the MySQL server. You might set the number of attempts higher and use a longer delay when you expect the MySQL server to be down for maintenance, or when you expect the network to ...The argument attempts specifies the number of times a reconnect is ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlconnection-set-client-flags.html
Syntax: cnx.set_client_flags(flags) This method sets the client flags to use when connecting to the MySQL server, and returns the new value as an integer. For example, to unset LONG_FLAG and set the FOUND_ROWS flags: >>> from ...The flags argument ...