码迷,mamicode.com
首页 > 数据库 > 详细

MySQL you *might* want to use the less safe log_bin_trust_function_creators variable

时间:2016-05-25 14:40:25      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:

因为在打开日志文件情况下执行以前建立的 自定义函数报错详细分析如下:

     1 .调用自定义函数

     mysql>  select sp_function_dbdh_three();  #以前自定义的函数

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

    3. 根据错误提示做下列查询

    技术分享

   4. 设定开启状态

         SET GLOBAL log_bin_trust_function_creators = 1;

   5. 数据库服务重启后发现调用报错,根据经验需要设定环境全局变量设定方法如下

        (1) 在初始化参数的 [mysqld] 节加上:log_bin_trust_function_creators=1如下所示

             技术分享

        (2) 做相关函数查询如下:说明参数启作用.

          技术分享

 通过以上实例说明在启动日志操作后对函数的操作需要设定参数值否则无法使用.

MySQL you *might* want to use the less safe log_bin_trust_function_creators variable

标签:

原文地址:http://www.cnblogs.com/northeastTycoon/p/5526722.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!