CoderSathi
  • Tutorial
    • Java Tutorial
    • Swing Tutorial
    • JDBC Tutorial
    • Java String Tutorial
    • Servlet and JSP Tutorial
  • Mongo DB
  • AWS
  • DevOps
  • Linux
  • Git
Home > How to > Error Code: 1175. You are using safe update mode… while modifying MySQL data from Workbench

Error Code: 1175. You are using safe update mode… while modifying MySQL data from Workbench

Learn the concepts, implementation details, and practical steps with a clean developer-focused walkthrough.

Yuba Raj Kalathoki
By Yuba Raj Kalathoki
Published: April 28, 2022 ยท 1 min read ยท 0 Comments
Share: X in ๐Ÿ”—
mysql logo

Today, I encountered an error code 1175 while deleting the MySQL table row using MySQL Workbench. The error was like:

delete from mytablename where  mycolum='myvalue'	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.	0.265 sec

This is because my MySQL server has a safe-update option enabled.

As per the MySQL documentation on safe update, we can’t DELETE or UPDATE records without specifying KEY in the WHERE clause.

For example:

We have a table student and it has a primary key rollNo. Then, if we try to use DELETE or UPDATE query without specifying rollNo key in WHERE clause it does not allow us to modify the data.

Hence, to solve this issue we need to disable the safe update mode before executing the query.

Query to disable:

SET SQL_SAFE_UPDATES = 0;

The above query disables the safe mode option and it allows us to execute query even if we are not specifying the key in WHERE clause.

To make it safe, we can again enable safe mode after executing our DELETE or UPDATE query.

Query to enable:

SET SQL_SAFE_UPDATES = 1;

Related Posts:

  • MySQL Commands for Developers
  • Control Statements in Java
  • Scrollable ResultSet in JDBC
  • Processing Results with ResultSet in JDBC
  • Install and Set Up Java Development Environment
  • JDBC Interview Questions: Ace Your Technical Screening
Tags:devopsmysql
Was this article helpful?
โ† Previous ArticleInternationalization in Java
Next Article โ†’Create User in MySQL

Leave a Comment Cancel reply

You must be logged in to post a comment.

Recent Posts

  • How to Use AWS CloudFront Signed URLs in Spring Boot?
  • How to Fix SSH Agent Forwarding on macOS: The Ultimate Guide for Developers
  • How to Read AWS Secrets Manager in Spring Boot (Step-by-Step)
  • How to Fix “Public Key Retrieval is not allowed” MySQL JDBC Error
  • Complete Guide to JaCoCo: How to Measure Java Code Coverage Accurately
CoderSathi

Your go-to resource for Java, Spring Boot, Microservices, AWS, and modern development tutorials.

Quick Links

  • About
  • Contact

Popular Topics

  • Java
  • Spring Boot
  • AWS
  • DevOps
  • MongoDB
  • Linux
  • Git
  • How to
ยฉ 2026 CoderSathi. All rights reserved. Privacy Policy ยท Sitemap