Mysql创建函数出错的解决
2014-01-03 09:59
148 查看
在MySQL创建用户自定义函数时,报以下错误:
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)
这是因为有一个安全参数没有开启,log_bin_trust_function_creators 默认为0,是不允许function的同步的,开启这个参数,就可以创建成功了。
如果是在有master上开启了该参数,记得在slave端也要开启这个参数(salve需要stop后再重新start),否则在master上创建函数会导致replaction中断。
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)
这是因为有一个安全参数没有开启,log_bin_trust_function_creators 默认为0,是不允许function的同步的,开启这个参数,就可以创建成功了。
mysql> show variables like '%fun%'; +---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin_trust_function_creators | ON | +---------------------------------+-------+ 1 row in set (0.00 sec) mysql> set global log_bin_trust_function_creators=1; Query OK, 0 rows affected (0.00 sec) mysql> show variables like '%fun%'; +---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin_trust_function_creators | ON | +---------------------------------+-------+ 1 row in set (0.00 sec)
如果是在有master上开启了该参数,记得在slave端也要开启这个参数(salve需要stop后再重新start),否则在master上创建函数会导致replaction中断。
相关文章推荐
- mysql创建函数出现1418错误的解决办法
- mysql创建函数失败问题解决办法
- MySQL 开启bin-log,创建函数出错。DETERMINISTIC
- mysql 创建函数报错:This function has none of DETERMINISTIC, NO SQL解决办法
- Mysql创建函数出错
- 解决mysql不能创建函数
- Mysql无法创建函数解决办法
- mysql 创建函数时出现 Error Code : 1418 错误解决办法
- mysql创建函数出现1418错误的解决办法
- 解决mysql不能创建函数
- MYSQL 创建函数出错的解决方案
- MYSQL 创建函数出错的解决方案
- MySQL创建自定义函数时 Error Code: 1418 的解决方法
- mysql 创建函数时出现 Error Code : 1418 错误解决办法
- 关于mysql创建、导入函数和存储过程报#1418错问题解决
- mysql 创建函数的基本规则和使用用法;
- mysql 创建视图出现1349 View's SELECT contains a subquery in the FROM clause解决办法
- MYSQL升级到5.7中的后GROUP BY语句出错解决方法
- 用arcgis裁剪面时出错,ERROR 999999: 执行函数时出错.拓扑无效 空多边形不完整.执行Clip失败 的解决办法
- 安装mysql出错”A Windows service with the name MySQL already exists.“如何解决