> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1400-to-1499/e1419.md).

# Error 1419: You do not have the SUPER privilege and binary logging is enabled

| Error Code | SQLSTATE | Error                                    | Description                                                                                                                                            |
| ---------- | -------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 1419       | HY000    | ER\_BINLOG\_CREATE\_ROUTINE\_NEED\_SUPER | 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) |

## Possible Causes and Solutions

When binary logging is enabled, creating a stored function or a trigger needs the `SUPER` privilege, unless [log\_bin\_trust\_function\_creators](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md#log_bin_trust_function_creators) is set. The server enforces this because the body of a function or trigger is not written to the binary log statement by statement. A function that isn't deterministic could change different data on a replica, or when the binary log is replayed. Stored procedures aren't affected. In Galera Cluster, the same check applies even when binary logging is off.

```
CREATE FUNCTION f2() RETURNS INT DETERMINISTIC RETURN 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)

CREATE TRIGGER t1 BEFORE INSERT ON acct FOR EACH ROW SET @x=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)
```

A function declared with none of `DETERMINISTIC`, `NO SQL` or `READS SQL DATA` fails first with [error 1418](/docs/server/reference/error-codes/mariadb-error-codes-1400-to-1499/e1418.md), even for an account with `SUPER`.

To solve the error, do one of these:

* Create the function or trigger with an account that has the `SUPER` privilege.
* Set `log_bin_trust_function_creators` to ON, with `SET GLOBAL log_bin_trust_function_creators=1`, or in the configuration file so that it survives a restart. The server then trusts every account that can create routines and triggers to declare its functions correctly. Do this only if you trust those accounts.

See [Binary Logging of Stored Routines](/docs/server/server-usage/stored-routines/binary-logging-of-stored-routines.md) for the full rules.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
