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

 

posted @ 2015-05-21 13:53  廖东海  阅读(183)  评论(0编辑  收藏  举报