MySQL: Granting SUPER Privileges to a Database
When attempting to execute the query SET GLOBAL log_bin_trust_function_creators =1, you may encounter an #1227 - Access denied; you need the SUPER privilege for this operation error. This indicates that the user attempting to execute the query lacks the necessary SUPER privileges.
To grant SUPER privileges to a database, you have two options:
Using phpMyAdmin:
Using the MySQL Console:
Execute the following command:
mysql> GRANT SUPER ON *.* TO user@'localhost' IDENTIFIED BY 'password';
Replace user with the name of the user to be granted privileges and password with the user's password.
Flush the privileges:
mysql> FLUSH PRIVILEGES;
Note:
The SUPER privilege is a global privilege that applies to all databases. Therefore, it is recommended to grant it using *.* (all databases) rather than a specific database name.
The above is the detailed content of How to Grant SUPER Privileges in MySQL?. For more information, please follow other related articles on the PHP Chinese website!