ERROR 1419 (HY000): You do not have the SUPER Privilege  and Binary  Logging is  Enabled

导入function 、 trigger 到 MySQL database,报错: “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)”.

原因:
function / trigger 中有dangerous statements修改数据库,错误只在启用binary logging选项进行主从复制的服务器上出现。

解决:

1)导入数据的用户不仅需要CREATE ROUTINE, ALTER ROUTINE, CREATE TRIGGER, ALTER TRIGGER, CREATE FUNCTION 和 ALTER FUNCTION 权限,还需要SUPER privileges 权限,使用超级用户导入数据。
2)让所有用户具有执行类似functions的权限,危险,不推荐,
          o by specifying it on the server start, like: –log-bin-trust-function-creators=1
          o by setting it to 1 through the SET GLOBAL statement, like:
 mysql> SET GLOBAL log_bin_trust_function_creators = 1;
3)如果不需要复制,或者是从库,关闭binlog,
# binary logging – not required for slaves, but recommended
#log-bin=mysql-bin
# binary logging format – mixed recommended
#binlog_format=mixed

原文:http://www.ispirer.com/wiki/sqlways/troubleshooting-guide/mysql/import/binary-logging     

原创文章,转载请注明: 转载自素食勤俭敬老孝慈

本文链接地址: mysql导入数据提示没有SUPER Privilege权限处理

文章的脚注信息由WordPress的wp-posturl插件自动生成

Tags:

1,368 views

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <font color="" face="" size=""> <span style="">