ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled

Created at 23-Apr-2023 , By samar

When you encounter the "ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled" error in MySQL, and you do not have the SUPER privilege, you may be able to resolve the issue by setting the "log_bin_trust_function_creators" variable to 1. However, this solution should be used with caution, as it can be less secure.

You can set the "log_bin_trust_function_creators" variable using an SQL command in MySQL.

  1. Open a terminal or command prompt on your computer.

  2. Type the following command and press Enter.

mysql -u root -p 

Enter your password when prompted and press Enter. If the password is correct, you will be logged in to the MySQL shell.

  1. Now enter the below command.
SET GLOBAL log_bin_trust_function_creators = 1;

This SQL command will set the "log_bin_trust_function_creators" variable to 1 for the current MySQL server instance, allowing non-SUPER users to create functions and procedures that are trusted for replication. However, as I mentioned earlier, this solution should be used with caution, as it can be less secure. It is recommended that you fully understand the risks before using this solution.

  • Grant supper privilege to user

    UPDATE mysql.user SET Super_Priv='Y' WHERE user='user1' AND host='%'; 
    

    OR

    GRANT SUPER on *.* to 'user1'@'%';
    
  • FLUSH PRIVILEGES

    FLUSH PRIVILEGES;
    
  • Turn of binary logging when not using replication

    SET sql_log_bin = OFF;
    

Back to code snippet queries related sql

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.