Workbench is the free visualization database operation software provided by the mysql official, which is often used by developers to connect to the database and execute the SQL code. I met “safe update mode” error recently, here is one way to solve this problem.
First, we look the error code.
Error Code: 1175. 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, toggle the option in Preferences -> SQL Queries and reconnect.
It means safe mode has been enabled and it will not allow us to make any changes in the table, thus first of all we should make changes to disable the safe update mode.
Here is effective code.
SET SQL_SAFE_UPDATES = 0;
After executing this line of command code in workbench, we find that the statements of UPDATE and DELETE can be executed normally.
Damon, Chinese, Liu Guangzhi, Software development engineer,
Good at ASP.NET, Java, PHP, Python, etc, Love sports, Workaholic, Communist.