Lab-verifiedReproduced and fixed on MySQL 8.4.13 · 2026-11-29 · container image mysql:8.4
MySQL 8.4 turns on binary logging by default. In that state, a normal account that creates a stored function or a trigger gets ERROR 1419, even with ALL privileges on its own database and even when the function is declared DETERMINISTIC.
Below, account lab_a (ALL on database lab_a) hits the error twice. In both cases an admin account (root) created the same object in lab_a, and lab_a could then use it. The message also suggests log_bin_trust_function_creators; this page only checked its value (OFF) and did not change it.
01A normal account creates a stored function
lab_a runs CREATE FUNCTION add_tax(p INT) RETURNS INT DETERMINISTIC RETURN ROUND(p * 1.1); and gets ERROR 1419. DETERMINISTIC is already there, so this is not ERROR 1418.
SHOW VARIABLES showed log_bin = ON and log_bin_trust_function_creators = OFF. Then root created the function as lab_a.add_tax, and lab_a called SELECT add_tax(1000), which returned 1100.
CREATE FUNCTION add_tax(p INT) RETURNS INT DETERMINISTIC
RETURN ROUND(p * 1.1);ERROR 1419 (HY000): 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)SHOW VARIABLES WHERE Variable_name IN ('log_bin', 'log_bin_trust_function_creators');+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| log_bin | ON |
| log_bin_trust_function_creators | OFF |
+---------------------------------+-------+
2 rows in set (0.00 sec)CREATE FUNCTION lab_a.add_tax(p INT) RETURNS INT DETERMINISTIC
RETURN ROUND(p * 1.1);Query OK, 0 rows affected (0.00 sec)Put function and trigger DDL in a migration that runs with an admin account, and keep the app account for running them.
SELECT add_tax(1000) AS price;+-------+
| price |
+-------+
| 1100 |
+-------+
1 row in set (0.00 sec)02A normal account creates a trigger
Triggers are checked the same way. lab_a owns the orders table, but CREATE TRIGGER orders_bi BEFORE INSERT ON orders … SET NEW.created_at = NOW(); failed with the same ERROR 1419.
root created it as lab_a.orders_bi ON lab_a.orders. After that, an INSERT by lab_a filled created_at automatically (has_time = 1).
Setup
CREATE TABLE orders (id INT PRIMARY KEY, amount INT, created_at DATETIME);Query OK, 0 rows affected (0.01 sec)CREATE TRIGGER orders_bi BEFORE INSERT ON orders
FOR EACH ROW SET NEW.created_at = NOW();ERROR 1419 (HY000): 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)CREATE TRIGGER lab_a.orders_bi BEFORE INSERT ON lab_a.orders
FOR EACH ROW SET NEW.created_at = NOW();Query OK, 0 rows affected (0.01 sec)INSERT INTO orders (id, amount) VALUES (1, 500);
SELECT id, amount, created_at IS NOT NULL AS has_time FROM orders;Query OK, 1 row affected (0.00 sec)
+----+--------+----------+
| id | amount | has_time |
+----+--------+----------+
| 1 | 500 | 1 |
+----+--------+----------+
1 row in set (0.00 sec)FAQ
Why do I get ERROR 1419 even with DETERMINISTIC?
Because 1419 is about the account, not the declaration. With binary logging on, an account without SUPER cannot create the function. On this page the DETERMINISTIC function still failed for lab_a and succeeded for root.
What is the difference between ERROR 1418 and ERROR 1419?
1418 means the function is missing DETERMINISTIC, NO SQL or READS SQL DATA. 1419 means the creating account lacks SUPER while binary logging is on. You can get 1419 even after fixing 1418.
Does CREATE TRIGGER also give ERROR 1419?
Yes. On MySQL 8.4 with binary logging on, the trigger on lab_a's own table failed with the same message, and worked when created by root.
How do I check whether binary logging is on?
SHOW VARIABLES WHERE Variable_name IN ('log_bin', 'log_bin_trust_function_creators'); On the default MySQL 8.4 container it showed ON and OFF.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test, each with full rights on a database of the same name (its default database); root is the administrator. MySQL 8.4.13