北京SEO

MySQL创建函数报“ERROR 1418 ”错误,不能创建函数

2019/10/10/17:36:56  阅读:1670  来源:谷歌SEO算法  标签: 微服务

MySQL创建函数报ERROR 1418错误,不能创建函数,根据官方提示是说,不能创建函数可能是一个安全设置方面的配置或功能未开启原因,下面我们一起来看.

错误:ERROR 1418 (HY000): 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)

ERROR 1418 (HY000): 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)

分析:MySQL函数不能创建,是未开启功能.

根据系统提示,导致该错误的原因可能是一个安全设置方面的配置,查手册log_bin_trust_function_creators参数缺省0,是不允许function的同步的,一般我们在配置repliaction的时候,都忘记关注这个参数,这样在master更新funtion后,slave就会报告错误,然后slave stoped.

处理过程:解决方法,MySQL函数不能创建,是未开启功能,代码如下:

  1. mysql>showvariableslike‘%func%’;
  2. +———————————+——-+
  3. |Variable_name|Value|
  4. +———————————+——-+
  5. |log_bin_trust_function_creators|OFF|
  6. +———————————+——-+
  7. 1rowinset(0.00sec)
  8. mysql>setgloballog_bin_trust_function_creators=1;
  9. QueryOK,0rowsaffected(0.00sec) //phpfensi.com
  10. mysql>showvariableslike‘%func%’;
  11. +———————————+——-+
  12. |Variable_name|Value|
  13. +———————————+——-+
  14. |log_bin_trust_function_creators|ON|
  15. +———————————+——-+
  16. 1rowinset(0.00sec)mysql>

如果上方法不能成功解决mysql中的ERROR 1418错误,那还得请你使用下面方法试试.

第一步:mysql> SET GLOBAL log_bin_trust_function_creators = 1;

第二步:系统启动时 –log-bin-trust-function-creators=1

第三步:在my.ini(Linux下为my.conf)文件中 [mysqld] 标记后加一行内容为 log-bin-trust-function-creators=1

广告内容

MySQL创建函数报“ERROR 1418 ”错误,不能创建函数 MySQL创建函数报“ERROR 1418 ”错误,不能创建函数 MySQL创建函数报“ERROR 1418 ”错误,不能创建函数

相关阅读

热门评论

互联网十八般武艺 互联网十八般武艺

互联网十八般武艺

总篇数179

精选文章

RMAN中catalog和nocatalog区别介绍 小技巧:为Linux下的文件分配多个权限 zimbra8.5.1安装第三方签名ssl证书的步骤 解决mysql不能远程连接数据库方法 windows服务器mysql增量备份批处理数据库 mysql中slow query log慢日志查询分析 JavaScript跨域问题总结 Linux下负载均衡软件LVS配置(VS/DR)教程 mysql中权限参数说明 MYSQL(错误1053)无法正常启动

SEO最新算法