ErrorCode:1418?
ThisfunctionhasnoneofDETERMINISTIC,NOSQL,orREADSSQLDATAinitsdeclarationandbinaryloggingisenabled(you*might*wanttousethelesssafelog_bin_trust_function_creatorsvariable)
(0mstaken) ?
解决方法如下:?
1. mysql> SET GLOBAL log_bin_trust_function_creators = 1;?
2.?系统启动时 --log-bin-trust-function-creators=1?
3. 在my.ini(linux下为my.conf)文件中 [mysqld] 标记后加一行内容为 log-bin-trust-function-
creators ?
creators ?
如果在create function的时候有 1418的错语的时候:那么只需要执行set global log_bin_
trust_routine_creators=1;?
trust_routine_creators=1;?
然后怎么create function 都不会有问题(当然,你的function必段正确哦),这是mysql的一个bug,
搞不懂为什么,反正这样做就OK了. ?
搞不懂为什么,反正这样做就OK了. ?
另外,也可以直接在配置文件my.cnf中添加如下行[mysqld] log_bin_trust_routine_creators=1;?
这个命令可以在sql editor的环境中运行,并不需要重新启动服务哦。
转载http://www.2cto.com/database/201211/168865.html