Last answered:

07 Jul 2023

Posted on:

07 Jul 2023

0

Safe Update still working

Hi everyone

Desite the fact that I unabled the safe update as mentioned in the first video of this section, It is still preventing me from doing an update statement without where condition. Is there any explanation or help?

Best

Saeed


 

1 answers ( 0 marked as helpful)
Instructor
Posted on:

07 Jul 2023

0

Hi Saeed!

Thanks for reaching out!

Even if you've disabled safe updates in MySQL Workbench, it's possible that it's still being enforced at the server level. MySQL Server has a system variable called sql_safe_updates which, when enabled, restricts UPDATE and DELETE statements similarly to Workbench's safe updates mode.

To see if this variable is enabled at the server level, you can run the following command:

SHOW VARIABLES LIKE 'sql_safe_updates';

If the value is ON, you can turn it off for your current session using:

SET sql_safe_updates=0;


Hope this helps.

Best,

Ivan

Submit an answer