MySQL Error 1419 on AWS RDS: You do not have the SUPER privilege and binary logging is enabled

Fixing MySQL Error Code 1419 on AWS RDS: Missing SUPER Privilege with Binary Logging Enabled

If you’ve ever tried to create a stored function or trigger in MySQL on Amazon RDS and encountered the error below, you’re not alone:

Error Code: 1419. 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)

This error is common when using AWS RDS because Amazon RDS restricts access to certain high-level privileges like SUPER for security and stability reasons.

Let’s break down why this happens—and how to fix it using AWS RDS Parameter Groups.


🔍 Why This Error Happens

In MySQL, when binary logging is enabled (which it is by default on RDS for replication and recovery), creating stored functions or triggers requires either the SUPER privilege or that the parameter log_bin_trust_function_creators is set to 1.

Since RDS does not grant SUPER privileges, the only solution is to set the log_bin_trust_function_creators parameter to 1.


✅ Solution: Update Parameter Group on AWS RDS

Here’s how to resolve this step-by-step:

Step 1: Open the RDS Console

  • Go to your AWS Management Console.
  • Navigate to Amazon RDS.

Step 2: Create a New Parameter Group

  • Click on Parameter Groups from the left sidebar.
  • Click Create Parameter Group.
  • Choose the DB Parameter Group Family that matches your MySQL version (e.g., mysql8.0).
  • Enter a Group Name and optional description.
  • Click Create.

Step 3: Edit the New Parameter Group

  • Select your newly created parameter group.
  • Click Edit Parameters.
  • Search for log_bin_trust_function_creators.
  • Set its value to 1.
  • Click Save Changes.

Step 4: Assign the Parameter Group to Your Instance

  • Go to the Databases section.
  • Click on your MySQL instance.
  • Click Modify.
  • Under Database Options, select the new parameter group from the DB Parameter Group dropdown.
  • Scroll down and check Apply Immediately.
  • Click Continue, then Modify DB Instance.

Step 5: Reboot (Optional)

  • If your RDS instance already had an attached parameter group and you just edited it, no reboot is needed, because log_bin_trust_function_creators is a dynamic parameter.
  • If you created and applied a new parameter group, it's best to reboot the instance:
    • Go back to your instance in the RDS console.
    • Choose Actions > Reboot.

🧪 Verify the Fix

After the changes, try running your CREATE FUNCTION or CREATE TRIGGER statement again. It should work without the Error 1419.


📝 Final Notes

  • Setting log_bin_trust_function_creators = 1 means that MySQL will not check the security characteristics of stored functions/triggers. Only do this if you trust your developers or fully control the code being run.
  • Always make sure your parameter group matches the correct MySQL version family.

🔧 TL;DR Fix Summary

ActionStep
Create Parameter GroupRDS Console > Parameter Groups > Create
Edit ParameterSet log_bin_trust_function_creators = 1
Attach to InstanceModify DB Instance > Assign Group > Apply Immediately
RebootOnly if you created a new group