-->

DEVOPSZONES

  • Recent blogs

    MySQL: You do not have the SUPER privilege and binary logging is enabled

    The error:


    query failed: [1419] You do not have the SUPER privilege and binary logging is enabled

    occurs in MySQL/MariaDB when executing a query that uses functions like CREATE FUNCTION without required privileges under binary logging.


    ❓ Why This Happens

    When binary logging (log_bin) is enabled, MySQL requires either:

    • SUPER privilege (deprecated), or

    • SET @func_is_deterministic = 1; or other specific flags
      to create stored functions, for replication safety.

    Zabbix uses CREATE FUNCTION for some database items during upgrade — and fails without this privilege.


    ✅ Solutions

    🔧 Option 1: Temporarily Disable Binary Logging (Recommended for Upgrade Only)

    Edit my.cnf or my.ini (MySQL config file):


    [mysqld] log_bin = 0

    Then restart MySQL:


    sudo systemctl restart mysql

    ✅ Now run the Zabbix upgrade, then re-enable binary logging afterward.


    🔐 Option 2: Create Functions With Proper SQL_MODE and Set Characteristics

    If disabling binary logging is not an option, run:


    SET GLOBAL log_bin_trust_function_creators = 1;

    Then run the upgrade again.

    This allows creation of stored functions without needing SUPER if you trust your application (like Zabbix) to do it safely.

    ⚠️ Note: You need SUPER or SYSTEM_VARIABLES_ADMIN privilege to run that command.

    To make this permanent:


    [mysqld] log_bin_trust_function_creators = 1

    Then restart MySQL.


    🧠 Why This Matters

    The SUPER privilege was deprecated for security. Zabbix expects to run CREATE FUNCTION, so binary logging policies block this unless the server trusts the function creator.

    No comments