MySQL报 you *might* want to use the less safe log_bin_trust_function_creators variable错误解决方法
MySQL报 you might want to use the less safe log_bin_trust_function_creators variable错误解决方法
解决报错:
SET GLOBAL log_bin_trust_function_creators = 1;
具体说明如下:
在打开日志文件情况下执行以前建立的 自定义函数报错详细分析如下:
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;
-
数据库服务重启后发现调用报错,根据经验需要设定环境全局变量设定方法如下
(1) 在初始化参数的 [mysqld] 节加上:log_bin_trust_function_creators=1如下所示
(2) 做相关函数查询如下:说明参数启作用.
![]()
本文来自博客园,作者:King-DA,转载请注明原文链接:https://www.cnblogs.com/qingmuchuanqi48/articles/16686612.html


浙公网安备 33010602011771号