Mysql 创建函数出现This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA

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

mysql的设置默认是不允许创建函数

解决办法1:

执行:

SET GLOBAL log_bin_trust_function_creators = 1;

不过 重启了 就失效了

注意: 有主从复制的时候 从机必须要设置  不然会导致主从同步失败

解决办法2:

在my.cnf里面设置

log-bin-trust-function-creators=1

不过这个需要重启服务

上一篇:Nexus Root Toolkit教程——刷机


下一篇: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