Permenantly disable Safe Updates in MySQL Workbench?
Asked Answered
C

2

8

Re: the error "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column"

The two options to fix this are disabling safe mode through the gui (Edit>Preferences>Sql Editor) or by manually entering SET SQL_SAFE_UPDATES = 0;

However, everything I'm reading seems to indicate you must do this every time you connect. Is there a way to disable Safe Update Mode permanently so I don't need to do this every time?

Caning answered 3/1, 2018 at 21:35 Comment(5)
The setting in the preferences is permanent.Footman
Maybe this isn't the "fix" you actually need to the problem you actually have.Buddleia
It would be easy to test that. Run an unsafe query to see if that gives you the error. Then set the option in the preferences to ignore unsafe queries, close Workbench, reopen it and run the query again. You will then see there's no error from Workbench.Kra
There is no way to turn it off in Mac OS Workbench 6.3. The option does NOT exist.Eurus
The setting in the preferences is NOT permanent, at least not in Windows-worldJingoism
J
1

Given that Workbench (at least in Windows-world) restores your open queries, if you keep SET SQL_SAFE_UPDATES = 0; in a query window, it will be quicker to re-run at start-up than re-entering it. Maybe there are other settings which aren't saved but could be added too. Like if there was one to say "no side panels please", or "show Schema, not Administration".

Not ideal, but every little helps.

Jingoism answered 15/2, 2021 at 8:9 Comment(1)
Yep, one of the minor annoyances of Workbench I've learned to live with. Of course, the more correct answer to my problem would be to ensure every table has a primary key :)Caning
F
0

Had run into the same problem with windows and as mentioned earlier (The setting in the preferences is NOT permanent, at least not in Windows-world),However i just reconnected to the server ( query - Reconnect to server).This worked for me .

Floriaflorian answered 6/9 at 14:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.