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

How Can I Grant SUPER Privileges in MySQL?

Linda Hamilton
Release: 2024-12-05 02:43:13
Original
724 people have browsed it

How Can I Grant SUPER Privileges in MySQL?

Assigning SUPER Privileges to MySQL Database

Problem

When attempting to execute the query SET GLOBAL log_bin_trust_function_creators = 1, the following error occurs: #1227 - Access denied; you need the SUPER privilege for this operation. How can SUPER privileges be assigned to a MySQL database?

Solution

Using phpMyAdmin:

  1. Navigate to phpMyAdmin's Privileges tab.
  2. Click Edit User.
  3. Under the Administrator tab, select the SUPER checkbox.
  4. Click Go.

Using MySQL Console:

  1. Execute the following query:

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

    Replace user with the username and password with the user's password.

  2. End the session with FLUSH PRIVILEGES;.

    mysql> FLUSH PRIVILEGES;
    Copy after login

Note: It is recommended to grant SUPER privileges with *.* (all databases) instead of a specific database, as SUPER is a global privilege.

The above is the detailed content of How Can 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