Hey, Welcome to the practice house. In this post, we will learn how to solve a SQL error that is known as Error Code: 1175 or safe update mode MySQL error 1175.
or maybe you are known to this error because it comes in your MySQL workbench kinda like this.
So if you see the error in row number 5 in the above-mentioned picture you will notice in the message column that’s saying.
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 Editor and reconnect.
And You can also choose the best way to handle it. The most common way to handle it Through a SQL Query.
SET SQL_SAFE_UPDATES = 0;
update yourTableName SET columnNames = "";
SET SQL_SAFE_UPDATES = 1;
So Basically, with the above query, we are disabling the safe update option then we do our update then we set our safe update option enabled.
If you think you are good enough in SQL and you know what you are doing then you can keep it disabled. But best practice is to keep it enabled.
As you see in the above error message. Yes, it’s quite right that you can toggle the option in
Preferences -> SQL Editor and you can solve it.
the steps are mentioned below
- Go to
"SQL Editor"tab and
Reconnect to Server
- Now execute your SQL query.
I hope it helped you. If it’s not please let me know what exactly you are facing I would love to try my best to solve your problem.
Have a great day ahead.
I love to explore new technologies. If you like my tutorials please share your thoughts about my work.
Check out my YouTube Channel For Video Tutorials.
To Hire Me Please Contact Me Through Social Media or https:www.amialif.com
If you want to help others by doing donation please Help Them.
You also can connect with me via social media. Thanks