I need to enable functions, procedures, and triggers for an instance of MySQL on Amazon RDS. How can I do this?

To use functions, procedures, or triggers when binary logging is enabled requires the MySQL SUPER privilege, which is restricted for RDS MySQL DB instances.

You can can enable functions, procedures, and triggers when binary logging is enabled without the SUPER privilege by setting the log_bin_trust_function_creators parameter to true for the DB parameter group that you create for your MySQL instance(s).

Note
A default DB parameter group is created if you create a DB instance without specifying a DB parameter group that you create. This group contains database engine defaults and Amazon RDS system defaults based on the engine, compute class, and allocated storage of the instance. You cannot modify the parameter settings of a default DB parameter group; you must create your own DB parameter group to change parameter settings from their default value. Note that not all DB engine parameters can be changed in a DB parameter group that you create.

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
  2. In the navigation pane, choose Parameter Groups.
  3. Choose Create Parameter Group. The Create Parameter Group window appears.
  4. For Parameter Group Family, choose the parameter group family.
  5. For Group Name, type the name of the new DB parameter group.
  6. For Description, type a description for the new DB parameter group.
  7. Choose Create.

Important
After you create a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group.

For more information about creating a DB parameter group, see Working with DB Parameter Groups - Creating a DB Parameter Group.

  1. In the navigation pane, choose Parameter Groups. The available DB parameter groups appear in a list.
  2. In the list, select the parameter group you want to modify.
  3. Choose Edit Parameters and set the following parameter to the specified value:
        log_bin_trust_function_creators = 1
  4. Choose Save Changes.

Important
After you modify a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group.

For information about modifiying a DB parameter group, see Working with DB Parameter Groups - Modifying Parameters in a DB Parameter Group.

  1. In the navigation pane, choose Instances.
  2. Select the DB instance you want to associate with a DB parameter group.
  3. On the Instance Actions menu, choose Modify.
  4. In the Modify DB Instance dialog box, under Database Options, choose the parameter group you want to associate with the DB instance. Changing this setting does not result in an outage. The parameter group name changes immediately, but the actual parameter changes are not applied until you reboot the instance without failover.
  5. Apply changes by rebooting the instance.

Amazon RDS, MySQL, error 1419, create functions, super privilege, CURRENT_USER, stored procedure, DB parameter group, triggers, binary logging


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.