How to fix ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled in MySQL

MySQLINTERMEDIATEHIGHUpdated Dec 25, 2025ยท 316 views

ERROR 1419 occurs when creating or updating triggers and stored functions with binary logging enabled, but your MySQL user lacks the SUPER privilege. This is common in managed databases like AWS RDS where SUPER access is restricted.

Quick fix

Fixes 1419

-- Check binary logging status
SHOW VARIABLES LIKE 'log_bin%';

-- Check your current user and privileges
SELECT CURRENT_USER();
SHOW GRANTS FOR CURRENT_USER();
  1. Check if binary logging is enabled and your current privileges
  2. Set log_bin_trust_function_creators to 1 (easiest fix)
  3. Remove or modify DEFINER clauses in your SQL dump (alternative fix)
  4. Grant SUPER privilege (if you have admin access)
mysql โ€” error
-- Check binary logging status
SHOW VARIABLES LIKE 'log_bin%';
-- Check your current user and privileges
SELECT CURRENT_USER();
SHOW GRANTS FOR CURRENT_USER();
ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled

What this error means

MySQL ERROR 1419 is a security-related restriction that prevents non-privileged users from creating or modifying triggers and stored functions when binary logging (replication) is enabled on the database server. This error exists because triggers and stored functions can contain statements that modify data, which need to be safely recorded in the binary log for replication consistency. If a non-SUPER user could create arbitrary triggers, it could lead to inconsistencies between the master and replica databases. The error message typically indicates that either: 1. Your MySQL user lacks the SUPER privilege 2. Binary logging is enabled on the server 3. The trigger or function being created has a DEFINER clause for a different user

Typical symptoms

  • CREATE TRIGGER statement fails with ERROR 1419
  • CREATE FUNCTION or ALTER FUNCTION statements fail with ERROR 1419
  • Database import/migration fails when processing .sql dump files containing triggers
  • AWS RDS or managed MySQL service rejects trigger creation
  • The error message mentions binary logging being enabled

Common causes

  1. Your MySQL user does not have the SUPER privilege and binary logging is enabled (most common in managed services)
  2. The .sql dump file contains triggers with a DEFINER clause referencing a different user (root, admin, etc.)
  3. You are using a managed database service like AWS RDS where SUPER privilege is restricted by design
  4. The stored function is not marked as DETERMINISTIC, which is required for non-SUPER users in some cases

How to fix "ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled"

1Check if binary logging is enabled and your current privileges

First, verify the actual cause by checking your privileges and the binary logging status:

sql
-- Check binary logging status
SHOW VARIABLES LIKE 'log_bin%';

-- Check your current user and privileges
SELECT CURRENT_USER();
SHOW GRANTS FOR CURRENT_USER();

Look for log_bin = ON or log_bin = 1 in the output. If you see SUPER in your grants, you may need to use that. If you don't see SUPER and log_bin is ON, you'll need one of the other solutions below.

2Set log_bin_trust_function_creators to 1 (easiest fix)

This is the recommended fix, especially for AWS RDS and other managed MySQL services. It tells MySQL to allow trigger/function creation even without the SUPER privilege:

sql
-- Set globally for current session
SET GLOBAL log_bin_trust_function_creators = 1;

-- Verify it was set
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';

For AWS RDS:
1. Go to the RDS console
2. Find your Parameter Group
3. Edit the group and set log_bin_trust_function_creators = 1
4. Reboot your RDS instance to apply the change

For MySQL Server (self-hosted), add this to your my.cnf or mysqld.cnf:

ini
[mysqld]
log-bin-trust-function-creators = 1

This is safe because it only affects triggers and functions created by your specific user, not global security.

3Remove or modify DEFINER clauses in your SQL dump (alternative fix)

If you're importing a .sql dump file, the issue might be that the dump contains triggers with DEFINER clauses for users that don't exist or that you don't have permission to use.

Strip DEFINER clauses before importing:

bash
# Linux/Mac: Remove all DEFINER clauses
sed -i 's/DEFINER=`[^`]*`@`[^`]*`//g' your_dump.sql

# Or remove just the DEFINER keyword but keep the backticks
sed -i 's/DEFINER=[^ ]* //g' your_dump.sql

# Then import
mysql -u user -p database < your_dump.sql

Or manually edit the dump file and remove lines like:

sql
DEFINER=`root`@`localhost`

This is useful if you can only temporarily allow trigger creation without changing the database configuration.

4Grant SUPER privilege (if you have admin access)

If you have administrative access to the MySQL server (not on AWS RDS), grant the SUPER privilege to your user:

sql
-- Grant SUPER privilege
GRANT SUPER ON *.* TO 'your_user'@'your_host';

-- Or for MySQL 8.0+, use the more granular SET_USER_ID privilege instead
GRANT SET_USER_ID ON *.* TO 'your_user'@'your_host';

-- Verify
SHOW GRANTS FOR 'your_user'@'your_host';

Note: SUPER is a very broad privilege and is deprecated in newer MySQL versions. Using log_bin_trust_function_creators is generally safer and preferred.

5Mark stored functions as DETERMINISTIC (for functions)

If you're creating a stored function (not a trigger), you can mark it as DETERMINISTIC to bypass some restrictions:

sql
CREATE FUNCTION my_function(param1 INT) RETURNS INT DETERMINISTIC
BEGIN
  -- Function body here
  RETURN param1 * 2;
END;

A function is DETERMINISTIC if it always returns the same result for the same input and doesn't modify data. This is only valid for functions, not triggers.

However, this doesn't always bypass ERROR 1419 if binary logging is enabled, so combining this with log_bin_trust_function_creators = 1 is more reliable.

Advanced notes

AWS RDS Specific Notes: Amazon RDS is a managed service that doesn't allow SUPER privilege for security reasons. You cannot use GRANT SUPER on RDS. The only viable solution on RDS is setting log_bin_trust_function_creators = 1 via the Parameter Group, then rebooting your instance.

MySQL 8.0+ Changes: Starting with MySQL 8.0, the SUPER privilege is deprecated and more granular privileges (like SET_USER_ID) are available. The log_bin_trust_function_creators variable remains the recommended approach for most users.

Binary Logging Importance: Binary logging is crucial for replication and point-in-time recovery. It's always enabled on managed services like RDS. Never disable it to work around this error.

Determinism and Safety: The distinction between DETERMINISTIC and non-DETERMINISTIC functions exists because non-deterministic functions can cause replication inconsistencies. Setting log_bin_trust_function_creators = 1 essentially trusts that the current user will create safe functions.

Frequently asked questions

What does "1419" mean?
MySQL ERROR 1419 is a security-related restriction that prevents non-privileged users from creating or modifying triggers and stored functions when binary logging (replication) is enabled on the database server. This error exists because triggers and stored functions can contain statements that modify data, which need to be safely recorded in the binary log for replication consistency. If a non-SUPER user could create arbitrary triggers, it could lead to inconsistencies between the master and replica databases.
How do I fix "1419"?
ERROR 1419 occurs when creating or updating triggers and stored functions with binary logging enabled, but your MySQL user lacks the SUPER privilege. This is common in managed databases like AWS RDS where SUPER access is restricted.
What causes "1419"?
Your MySQL user does not have the SUPER privilege and binary logging is enabled (most common in managed services) The .sql dump file contains triggers with a DEFINER clause referencing a different user (root, admin, etc.) You are using a managed database service like AWS RDS where SUPER privilege is restricted by design
Is the "1419" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading