MySQL error 1419: SUPER privilege needed with binary logging
With binary logging on, creating a stored function or trigger needs SUPER (or SET_USER_ID) unless log_bin_trust_function_creators is enabled.
- Error number
1419- Name
ER_BINLOG_CREATE_ROUTINE_NEED_SUPER- SQLSTATE
HY000- Category
- Access and privileges
What it means
When binary logging is enabled, MySQL is careful about stored functions and triggers because unsafe ones could make replicas diverge. By default it requires extra privilege to create them. 1419 says you don't have it. Declaring the function DETERMINISTIC, NO SQL or READS SQL DATA is part of what the check looks at.
Common causes
- Creating functions or triggers on a server with
log_binon (the default in MySQL 8.0) as a non-administrator. - Importing a dump with functions or triggers into a managed MySQL service.
How to fix it
-
Declare the function's characteristics accurately, for example
DETERMINISTICandREADS SQL DATA. -
If you administer the server and accept the replication risk, allow function creators.
SET PERSIST log_bin_trust_function_creators = 1;
-
On managed services, set
log_bin_trust_function_creatorsthrough the provider's parameter group or flags.
Related errors
More access and privileges errors
1045Access denied for user1044Access denied for user to database1130Host is not allowed to connect1698Access denied for user (no password)1142Command denied to user for table1143Command denied to user for column1396Operation CREATE USER failed
The code and message text are from the MySQL 8.4 Error Message Reference. Browse the full MySQL error list or search every database error.
Work on MySQL in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for MySQL and the other databases you use.