Home > Database > Mysql Tutorial > body text

mysql创建函数出现1418错误的解决办法

WBOY
Release: 2016-06-07 16:17:07
Original
1730 people have browsed it

本篇文章是对在Mysql中创建函数报ERROR 1418的解决方法进行了详细的分析介绍,需要的朋友参考下 复制代码 代码如下: Error Code : 1418 This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enab

本篇文章是对在Mysql中创建函数报“ERROR 1418”的解决方法进行了详细的分析介绍,需要的朋友参考下

 

复制代码 代码如下:


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)
(0 ms taken)


分析:
根 据系统提示,导致该错误的原因可能是一个安全设置方面的配置,查手册log_bin_trust_function_creators参数缺省0,是不允 许function的同步的,一般我们在配置repliaction的时候,都忘记关注这个参数,这样在master更新funtion后,slave就 会报告错误,,然后slave stoped。
处理过程:
登陆mysql数据库
> set global log_bin_trust_function_creators = 1;
> start slave;
跟踪mysql的启动日志,slave正常运行,问题解决。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!