mysql 导入函数_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权限。


版权声明:本文为weixin_28822657原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。