MYSQL 创建函数出错的解决方案

2019-01-04 21:44:07于海丽

案例三:

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正常运行,问题解决。

您可能感兴趣的文章:

解决Windows 10家庭版安装SQL Server 2014出现.net 3.5失败问题Windows2012配置SQLServer2014AlwaysOn的图解安装mysql出错”A Windows service with the name MySQL already exists.“如何解决Rails bundle命令安装mysql gem包出错的解决方法MySQL数据库的出错代码列表MYSQL常见出错代码对照windows server2014 安装 Mysql Applying Security出错的完美解决方法