在Amazon MySQL RDS中未为主用户定义SUPER权限
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了在Amazon MySQL RDS中未为主用户定义SUPER权限,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2159字,纯文字阅读大概需要4分钟。
内容图文
![在Amazon MySQL RDS中未为主用户定义SUPER权限](/upload/InfoBanner/zyjiaocheng/897/077b9a13ecc74c119a2b5f935a47f14f.jpg)
我在亚洲新加坡地区的亚马逊地区创建了一个中等实例.我用主密码创建了我的主用户.它与我本地PC上安装的工作台正常工作/连接.什么时候,我要在该实例上创建函数,它会向我显示以下错误
ERROR 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)
在我的实例中,我的变量(log_bin_trust_function_creators)显示为OFF.现在当我用变量改变时
SET GLOBAL log_bin_trust_function_creators = 1;
它给了我另一个错误
Error Code: 1227. Access denied; you need (at least one of) the SUPER privilege(s) for this operation
我不知道如何解决这个错误.
有谁可以帮忙???
解决方法:
您可以尝试更改log_bin_trust_function_creators;但是,当您考虑meaning of that variable时,有一种替代方法似乎更合适:
It controls whether stored function creators can be trusted not to create stored functions that will cause unsafe events to be written to the binary log.
A setting of
0
also enforces the restriction that a function must be declared with theDETERMINISTIC
characteristic, or with theREADS SQL DATA
orNO SQL
characteristic. If the variable is set to1
, MySQL does not enforce these restrictions on stored function creation.
所有这个选项都假设您知道自己在做什么,而不是通过使用CREATE语句中的三个特性中的一个来断言…但如果您没有正确声明该函数,则可能会错过关于潜在的优化.
misdeclaring a routine might affect results or affect performance
总而言之,这意味着最正确的方法是使用DETERMINISTIC或READS SQL DATA或NO SQL声明存储的函数,如果这些没有正确描述函数的行为,那么您的函数仍然可能导致不安全的语句写入二进制日志,因为these options也是“信任的”:
Assessment of the nature of a routine is based on the “honesty” of the creator: MySQL does not check that a routine declared
DETERMINISTIC
is free of statements that produce nondeterministic results.
好奇的一边:精明的观察者会注意到我从文档的描述中省略了一些东西:
If set to 0 (the default), users are not permitted to create or alter stored functions unless they have the
SUPER
privilege in addition to theCREATE ROUTINE
orALTER ROUTINE
privilege.
由于没有人在RDS中获得SUPER,并且假设这不是官方文档中的错误,这似乎必须是AWS行为的AWS定制.
内容总结
以上是互联网集市为您收集整理的在Amazon MySQL RDS中未为主用户定义SUPER权限全部内容,希望文章能够帮你解决在Amazon MySQL RDS中未为主用户定义SUPER权限所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。