// MySQL error reference

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
Error message
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)

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_bin on (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

  1. Declare the function's characteristics accurately, for example DETERMINISTIC and READS SQL DATA.

  2. If you administer the server and accept the replication risk, allow function creators.

    SET PERSIST log_bin_trust_function_creators = 1;
  3. On managed services, set log_bin_trust_function_creators through the provider's parameter group or flags.

Related errors

More access and privileges errors

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.

// fewer errors, faster fixes

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.