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

不过这个需要重启服务

原文地址:https://www.cnblogs.com/zhangzhiqin/p/8502713.html