MySQL Workbench, start with auto commit off

Add this to /etc/my.cnf (Linux) or my.ini (Windows)

[mysqld]
autocommit=0

Restart of mysql required !!! :(

UPDATE 2011-08-03 12:18 EDT

In MySQL Workbench you need to make sure the Data Changes Wizard is enabled. Here is why:

Enable Data Changes Commit Wizard - In the SQL Editor, when editing table data and then clicking the Applying changes to data button, a wizard is launched to step you through applying you changes. This gives you a chance to review the SQL that will be applied to the live server to make the requested changes. If the option is deselected, then the changes will simply be applied to the server, without the wizard being displayed, and without a chance to review the changes that will be made.

Here is how to check:

  • Open MySQL Workbench
  • Click Edit on Main Menu Bar
  • Click Preferences Under Edit
  • Click SQL Editor Tab
  • Look for the Last CheckBox Under Query Results

If it is checked, data gets committed via a Wizard requiring user intervention.

If it is unchecked, data gets committed, bypassing MySQL's autocommit protocols.


As of MySQL Workbench 6.0.0, you can set the "Leave autocommit mode enabled by default" preference. Set it under Preferences --> SQL Queries --> General.


Try SET SESSION autocommit = 0; This switch the autocommit flag to OFF in that session.

It worked for me.