现在的位置: 首页 > 综合 > 正文

mysql 使用笔记

2014年08月15日 ⁄ 综合 ⁄ 共 713字 ⁄ 字号 评论关闭

mysql MySQL Workbench  update 语句不能加条件

看资料说是 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 To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect.

当然有的说在
Edit->Preferences xxx->SQL Editor
把Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)的勾去掉
但是我的工具中没有

下边是我的工具中有的
 Preferences -> SQL Queries
"safe updates." Forbid UPDATE and DELETE statements without a WHERE clause 这项勾去掉

后来发现在其他论坛上解释有权限的情况下执行 如下sql即可了。
SET SQL_SAFE_UPDATES=0;

mysql 中不支持别名

在使用查询mysql 的时候别名总是报错 

加上 useOldAliasMetadataBehavior=true 就支持别名了。

<value><![CDATA[jdbc:mysql://192.168.227.170:3306/pay?useUnicode=true&characterEncoding=UTF8&useOldAliasMetadataBehavior=true]]></value>

抱歉!评论已关闭.