Home > Database > Mysql Tutorial > body text

ERROR CODE: 1175 YOU ARE USING SAFE UPDATE MODE AN

WBOY
Release: 2016-06-07 16:27:34
Original
1364 people have browsed it

快速高效用:SET SQL_SAFE_UPDATES = 0;下面的就不要看了! 今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示: Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that

快速高效用:SET SQL_SAFE_UPDATES = 0;下面的就不要看了!

今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示:


Error Code: 1175
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column


进过一番搜索之后发现原来是MySQL Workbench的安全设置。当要执行的SQL语句是进行批量更新或者删除的时候就会提示这个错误。

解决方法如下:

1.打开Workbench的菜单[Edit]->[Preferences...]
2.切换到[SQL Editor]页面
3.把[Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)]之前的对勾去掉
4.点击[OK]按钮
5.最后一步记得要重启一下Workbench,否则你仍然会得到这个错误提示。

如下图:

再次运行SQL语句就没问题了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template