原址:http://blog.chinaunix.net/uid-20639775-id-3031821.html
 
This function has none of DETERMINISTIC, NO SQL解决办法

创建存储过程时

出错信息:

ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

原因:

这是我们开启了bin-log, 我们就必须指定我们的函数是否是
1 DETERMINISTIC 不确定的
2 NO SQL 没有SQl语句,当然也不会修改数据
3 READS SQL DATA 只是读取数据,当然也不会修改数据
4 MODIFIES SQL DATA 要修改数据
5 CONTAINS SQL 包含了SQL语句

其中在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持。如果我们开启了 bin-log, 我们就必须为我们的function指定一个参数。

解决方法:

SQL code

mysql> show variables like 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF   |
+---------------------------------+-------+
mysql> set global log_bin_trust_function_creators=1;
mysql> show variables like 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | ON    |
+---------------------------------+-------+
这样添加了参数以后,如果mysqld重启,那个参数又会消失,因此记得在my.cnf配置文件中添加:
log_bin_trust_function_creators=1
 
执行以下语句:
 set global log_bin_trust_function_creators=1;
 

this function has none of deterministic, no sql,or reads sql data in its declaration and binary logging is enabled的更多相关文章

  1. mysql----------mysql5.7.11导入sql文件时报错This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled

    1.导入sql文件出现如下错误. [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in ...

  2. [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creator【s

    问题:执行创建函数的sql文件报错如下: [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA ...

  3. This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable

    This function has none of Deterministic,no sql,or reads sql data in its declaration and binary loggi ...

  4. mysql 创建函数ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_f

    mysql 创建函数的时候 报错 ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL D ...

  5. MySQL 创建函数报错 This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators

    问题描述 通过Navicat客户端,创建MySQL函数(根据的当前节点查询其左右叶子节点)时报错,报错信息如下: This function has none of DETERMINISTIC, NO ...

  6. mysql 5.7 创建函数报错,This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creat

    今天用命令创建函数, 报错 This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration ...

  7. Mysql ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA

    ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declar ...

  8. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its 错误解决办法

    This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary log ...

  9. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary lo的解决办法

    创建存储过程时,出错信息: ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA ...

随机推荐

  1. Android中SharedPreferences函数具体解释

    Android平台提供了一个SharedPreferences类,它是一个轻量级应用程序内部轻量级的存储方案,特别适合用于保存软件配置參数,比方boolean,int,float,long,Strin ...

  2. [LeetCode] Search a 2D Matrix [25]

    题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the fo ...

  3. STMP发送邮件被当垃圾邮件处理的解决方法

    昨天使用了.Net通过smtp发送邮件的方式发送了一封邮件到自己的QQ邮箱,但是发送成功后并没有提示邮箱收到新的邮件,而且去收件箱里面也没有新增的邮件. 这让本人觉得奇怪,所以就觉得是否被当作垃圾邮件 ...

  4. 网络基本功(二十七):Wireshark抓包实例分析HTTP问题

    转载请在文首保留原文出处:EMC中文支持论坛https://community.emc.com/go/chinese 介绍 HTTP的问题可能是由于慢速服务器或客户端,TCP性能问题,本文讨论上述问题 ...

  5. C# 想要程序文件移动 而数据保持相对位置

    如果用的数据库是access数据库 可以把数据库文件放到bin\debug下面,引用相对位置就可以了 如果程序中有上载文件,而程序需要使用到该文件,那么我们最好也是引用相对文件,我们只需要在数据表中的 ...

  6. Labview学习之远程控制VI

    Labview学习之远程控制VI        从LabVIEW 6.1开始,LabVIEW集成了Remote Panels技术,允许用户直接在客户端计算机上打开并操作位于服务器端计算机上的VI的前面 ...

  7. Oracle 查询时间在当天的数据

    要实现这个功能需要用到trunc这个函数对时间的操作 select trunc(sysdate) from dual --2014-12-27 今天的日期为2014-12-27 select trun ...

  8. h5的api dom全屏展示

    下面是完整的例子,暂不做分析 <!DOCTYPE html> <html> <head> <title> FullScreen API 演示</t ...

  9. 用SCMD2.0.8.0汉化版制作OB地图简易教程

    [综合] [复制链接]     Fenix_king       153 主题 0 好友 1万 积分 金星 该用户从未签到 星币 6392 水晶 0 星望 22 精华 0 发消息 电梯直达 楼主   ...

  10. 不包含任何UserControl

    奇怪了,以前做控件的时候都没有这个问题,哎,又堕落了1年,什么都忘了 创建自定义控件 可以继承现有控件,也可以继承userContrl类,但是现在有个问题 很多网上的资料说,啊,直接创建一个自定义控件 ...