解决1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and b

声音:非原著,借鉴借鉴

1418 - This function has none of DETERMINISTIC, NOSQL, or READS SQL DATA in its declaration and binary logging isenabled (you *might* want to use the less safelog_bin_trust_function_creators variable)错误。

 

原因是开启了log-bin日志,创建函数时,函数中没有包含DETERMINISTIC, NOSQL和 READS SQL DATA声明,即没有涉及修改数据。

 

 

解决:
  1、查出log_bin_trust_function_creators的值
    mysql--> show variables like 'log_bin_trust_function_creators'

    log_bin_trust_function_creators     OFF

 

  2、修改该值为ON

   mysql-->set global log_bin_trust_function_creators=1;

 

 3、修改该值为OFF

   mysql-->set global log_bin_trust_function_creators=0;

 

解决问题,不过要使该参数重启之后不失效,要在my.cnf修改为ON
————————————————
版权声明:本文为CSDN博主「桂学成」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/guixuecheng/java/article/details/42742303

posted @ 2020-05-21 13:39  wc_nan  阅读(2218)  评论(0编辑  收藏  举报