How to resolve MySQL Workbench error code 1175 while attempting to update records

I am trying to update a field in my MySQL Workbench database but encountering an issue. I want to set every entry in the user_status column to 1 with this SQL statement:

UPDATE customers SET user_status = 1;

However, when I execute it, I receive the following error message:

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE clause that uses a key column. To turn off safe mode, go to Preferences → SQL Editor and then reconnect.

I’ve already gone through the Edit menu, accessed Preferences, and unchecked the safe updates option under SQL Editor. I even rebooted MySQL Workbench, but I still see the same error.

What could I be overlooking? Is there a different approach to disabling this feature, or do I need to adjust my UPDATE query in some way? I want to update all entries at once without the need for specific WHERE conditions.

try adding a dummy where clause that always evaluates to true if you cant get safe mode disabled properly. something like:

UPDATE customers SET user_status = 1 WHERE 1=1;

this tricks mysql into thinking ur using a proper where condition even tho it updates everything. works as a quick workaroud when the settings keep acting up.

The safe mode setting can be stubborn sometimes. After unchecking the safe updates option in preferences, you need to completely disconnect from your database connection and establish a new one. Simply restarting Workbench isn’t enough - the connection itself needs to be refreshed.

Alternatively, you can temporarily disable safe mode for just this session by running this command first:

SET SQL_SAFE_UPDATES = 0;

Then execute your UPDATE statement, and if you want to re-enable it afterwards:

SET SQL_SAFE_UPDATES = 1;

This approach bypasses the preferences entirely and gives you immediate control over the safe mode setting without dealing with connection issues.

I encountered this exact same issue a few months ago, and what worked for me was checking the actual connection parameters. Even after disabling safe mode in preferences, some connections retain their original settings if they were established before the change.

Go to Database → Manage Connections, select your connection, and click Edit to look for the Advanced tab. There should be an option called “Others” where you might find SQL_SAFE_UPDATES=1 lingering there.

Also, verify whether you’re working with the correct connection profile. Sometimes Workbench creates multiple connection entries, and you might be using an older one with safe mode still enforced. If all else fails, creating a fresh connection profile usually resolves these persistent setting conflicts.

make sure u really reconnected after u unchecked that option. just restarting workbench might not do it. disconnect n connect again to apply the changes in safe mode setting. otherwise, the error will keep poppin’ up.