mysql create function error and solution.

Error Code: 1418. 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_creators variable

reason :

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


解决办法1:

执行:

SET GLOBAL log_bin_trust_function_creators = 1;

解决办法2:

在my.cnf里面设置

log-bin-trust-function-creators=1

原文地址:https://www.cnblogs.com/shouwangzhe-/p/4519536.html