mysql create function error and solution way.

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

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。