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


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

     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) 做相关函数查询如下:说明参数启作用.

         

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM