Home > Database > Mysql Tutorial > How Do I Grant SUPER Privileges in MySQL?

How Do I Grant SUPER Privileges in MySQL?

Mary-Kate Olsen
Release: 2024-12-12 15:24:17
Original
634 people have browsed it

How Do I Grant SUPER Privileges in MySQL?

Granting SUPER Privileges in MySQL

To execute certain queries in MySQL, such as "SET GLOBAL log_bin_trust_function_creators =1", you may encounter an error indicating that you lack the SUPER privilege. This privilege grants elevated permissions to manage database settings and perform administrative tasks.

Assigning SUPER Privileges via PHPMyAdmin

To grant SUPER privileges using PHPMyAdmin, follow these steps:

  1. Navigate to the PHPMyAdmin dashboard.
  2. Select the "Privileges" tab.
  3. Locate the user you wish to grant privileges to and click "Edit".
  4. Under the "Administrator" tab, check the box next to "SUPER".
  5. Click the "Go" button to save the changes.

Assigning SUPER Privileges via Console

Alternatively, you can grant SUPER privileges through the MySQL console:

mysql> GRANT SUPER ON *.* TO user@'localhost' IDENTIFIED BY 'password';
Copy after login

Be sure to replace "user" with the username and "password" with the user's password.

Once the grant command is executed, flush the privileges table to apply the changes:

mysql> FLUSH PRIVILEGES;
Copy after login

Note that SUPER privileges apply globally to all databases ("."), as they are not limited to a specific database.

The above is the detailed content of How Do I Grant SUPER Privileges in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template