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)
4.9/5 - (27 votes)

Last Updated on July 23, 2023 by Vikash Ekka

If you don’t have the SUPER privilege and binary logging is enabled in MySQL, you might encounter some restrictions when creating or altering stored functions and procedures. By default, binary logging ensures that all changes to the database are logged, allowing for replication and point-in-time recovery.

However, in this scenario, if you want to create or modify stored functions or procedures without having the SUPER privilege, you can enable the log_bin_trust_function_creators variable. This variable determines whether the creation of stored functions and procedures requires the SUPER privilege or not.

When log_bin_trust_function_creators is set to 1, it allows non-SUPER users, such as yourself, to create or modify stored functions and procedures without the SUPER privilege. This can be useful in certain situations where you need to work with stored routines but don’t have the necessary privileges.

How to enable log_bin_trust_function_creators in Mysql

You can follow these steps:

Step 1. Connect to your MySQL server using a user account that has the SUPER privilege.

Step 2. Open the MySQL configuration file (my.cnf or my.ini) in a text editor.

Step 3. Locate the [mysqld] section in the configuration file.

Step 4. Add or modify the following line within the [mysqld] section:

log_bin_trust_function_creators = 1

Step 5. Save the configuration file and exit the text editor.

Step 6. Restart the MySQL server for the changes to take effect.

Once you have enabled log_bin_trust_function_creators, you should be able to create or modify stored functions and procedures without requiring the SUPER privilege. However, please note that enabling this variable may have security implications, as it allows non-SUPER users to execute potentially unsafe code within stored routines.

By Vikash Ekka

Hi All, My name is Vikash Ekka from India. I’m the founder and tech editor of I have completed my Graduation in BCA. I love to write technical articles like Windows, Linux & MAC Tutorials, Tips, Tricks, How To fix, Tutorials About Ethical Hacking & Cyber Security Guide, and Software Review. Currently, I have been working as an IT professional since 2018.

Leave a Reply

Your email address will not be published. Required fields are marked *