网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 MYSQL设置触发器权限问题的解决方法
内容
    本文实例讲述了MYSQL设置触发器权限的方法,针对权限错误的情况非常实用。具体分析如下:
    mysql导入数据提示没有SUPER Privilege权限处理,如下所示:
    ?1 ERROR 1419 (HY000): You do not have the SUPER Privilege and Binary Logging is Enabled
    导入function 、 trigger 到 MySQL database,报错:
    ?1 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的权限,危险,不推荐,
    ?123 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,
    ?1234 # binary logging – not required for slaves, but recommended #log-bin=mysql-bin # binary logging format – mixed recommended #binlog_format=mixed
    希望本文所述对大家的MySQL数据库设计有所帮助。
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/14 10:30:40