Home / Blog / Post
Mysql Workbench Disable Safemode
Added on 01st April 2019 in Snippet

By default MySQL Workbench has Safe Mode enabled, which prevents sql's which dont target a primary key.

"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode"

Example of this would be

UPDATE tbl_users SET user_name = ''

In some situaltions you may need to do blanket SQL's such as above, I first ran into this when sanitizing a database for use in a dev enviroment.

In MySQL Workbench

  • Edit
  • Preferences
  • SQL Editor
  • Uncheck "Safe Updates"

Hi there, I am christopher shaw, a software developer form South Yorkshire, England.

I love tinkering with all things tech, and opened this website as a web presence for myself and a place to keep my notes and snippets. Hopefully you will find something here to help

Christopher Shaw