1419
MariaDBerrorpermissionshigh confidence
You do not have SUPER privilege and binary logging is enabled
Production Risk
Low — routine creation fails; no data affected.
What this means
Creating a stored routine requires SUPER privilege when binary logging is enabled and log_bin_trust_function_creators is OFF, because non-deterministic routines can cause replication issues.
Why it happens
- 1User lacks SUPER (or in 8.0, SYSTEM_VARIABLES_ADMIN) and log_bin_trust_function_creators is OFF
- 2Creating a function that could be non-deterministic with STATEMENT binlog format
How to reproduce
trigger — this will error
trigger — this will error
CREATE FUNCTION f() RETURNS INT READS SQL DATA BEGIN RETURN 1; END; -- as non-SUPER user
expected output
ERROR 1419 (HY000): You do not have SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
Fix 1
Grant SYSTEM_VARIABLES_ADMIN or SUPER
Grant SYSTEM_VARIABLES_ADMIN or SUPER
GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO 'user'@'host';
Why this works
Allows the user to create routines when binary logging is on.
Fix 2
Enable log_bin_trust_function_creators globally
Enable log_bin_trust_function_creators globally
SET GLOBAL log_bin_trust_function_creators = 1;
Why this works
Allows any user to create routines; reduces safety check.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1419 ER_BINLOG_CREATE_ROUTINE_NEED_SUPER
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev