简体   繁体   English

Amazon RDS 超级用户权限

[英]Amazon RDS super user privilege

I have created Amazon RDS instance, but can't create stored procedures in it because I am missing super user privilege.我创建了 Amazon RDS 实例,但无法在其中创建存储过程,因为我缺少超级用户权限。 How do I get super user privileges?如何获得超级用户权限?

Instance: MySQL 5.7.11实例:MySQL 5.7.11

You will not get super privilege in AWS RDS, but there is a way to disable binary logging (thereby removing the need to have SUPER privileges for creating triggers).您不会在 AWS RDS 中获得超级权限,但有一种方法可以禁用二进制日志记录(从而无需拥有创建触发器的超级权限)。 This is done by setting the variable log_bin_trust_create_function_creators to 1.这是通过将变量log_bin_trust_create_function_creators设置为 1 来完成的。

  1. Create a new RDS Parameter Group . 创建一个新的 RDS 参数组 Alternatively, you may modify your current parameter group (if its not the default parameter group) and skip steps 3-5.或者,您可以修改当前参数组(如果它不是默认参数组)并跳过步骤 3-5。
  2. Change the value of log_bin_trust_create_function_creators to 1 for that parameter group将该参数组的log_bin_trust_create_function_creators的值更改为 1
  3. Also change any parameters that have non-default values in the parameter group that your RDS instance is currently using.还要更改 RDS 实例当前使用的参数组中具有非默认值的任何参数。 This is necessary because an RDS instance can only be associated with one parameter group这是必须的,因为一个 RDS 实例只能关联一个参数组
  4. Modify your RDS instance so that it uses your new parameter group修改您的 RDS 实例,使其使用您的新参数组
  5. Wait for the parameter group change to show in the event log等待参数组更改显示在事件日志中
  6. Reboot the RDS instance .重启 RDS 实例 log_bin_trust_create_function_creators is labeled as dynamic vairable, and therefore shouldn't require a restart, but I have always needed to reboot the RDS instance for the change to take effect. log_bin_trust_create_function_creators被标记为动态变量,因此不需要重新启动,但我总是需要重新启动 RDS 实例以使更改生效。 Perhaps there is another way but I haven't found it.也许还有另一种方式,但我还没有找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM