欢迎光临
我们一直在努力

mysql无法导入函数和存储过程解决方法

mysql 创建函数时出现 Error Code : 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)

ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

 

1. mysql> SET GLOBAL log_bin_trust_function_creators = 1;

2. 系统启动时 –log-bin-trust-function-creators=1

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

 

我成功测试第三种方法.第一种没有成功,第二种没有试过.

官方资料:

 

ERROR 1419 (HY000): You do not have the SUPER privilege and
binary logging is enabled (you *might* want to use the less safe
log_bin_trust_routine_creators variable)
你可能不想强制要求子程序创建者必须有SUPER权限。例如,你系统上所有有CREATE ROUTINE权限的用户可能是有经验的应用程序开发者。要禁止掉对SUPER权限的要求,设置log_bin_trust_routine_creators 全局系统变量为1。默认地,这个变量值为0,但你可以象这样改变这样:

mysql> SET GLOBAL log_bin_trust_routine_creators = 1;
你也可以在启动服务器之时用–log-bin-trust-routine-creators选项来设置允许这个变量。

如果二进制日志功能不被允许,log_bin_trust_routine_creators 没有被用上,子程序创建需要SUPER权限。

赞(0) 打赏
未经允许不得转载:运维那些事 » mysql无法导入函数和存储过程解决方法

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏