Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.6Mb
PDF (A4) - 0.6Mb
EPUB - 137.6Kb
HTML Download (TGZ) - 85.2Kb
HTML Download (Zip) - 103.1Kb


10.2.35 MySQLConnection.autocommit Property

This property can be assigned a value of True or False to enable or disable the autocommit feature of MySQL. The property can be invoked to retrieve the current autocommit setting.

Note

Autocommit is disabled by default when connecting through Connector/Python. This can be enabled using the autocommit connection parameter.

When the autocommit is turned off, you must commit transactions when using transactional storage engines such as InnoDB or NDBCluster.


>>> cnx.autocommit
False
>>> cnx.autocommit = True
>>> cnx.autocommit
True


User Comments
Sign Up Login You must be logged in to post a comment.