Home » Mysql » how to add super privileges to mysql database?

how to add super privileges to mysql database?

Posted by: admin November 1, 2017 Leave a comment

Questions:

I am trying to execute query in mysql.

SET GLOBAL log_bin_trust_function_creators =1; 

Error:

SQL query:
SET GLOBAL log_bin_trust_function_creators =1
MySQL said:
#1227 – Access denied; you need the SUPER privilege for this operation

I want to know that how do i assign SUPER privileges to any database

Answers:

You can add super previlage using phpmyadmin:

Go to PHPMYADMIN > privileges > Edit User > Under Administrator tab Click SUPER. > Go

If you want to do it through Console, do like this:

 mysql> GRANT SUPER ON *.* TO [email protected]'localhost' IDENTIFIED BY 'password';

After executing above code, end it with:

mysql> FLUSH PRIVILEGES;

Questions:
Answers:

You can see the privileges here.enter image description here

Then you can edit the user

Questions:
Answers:

just the query phpmyadmin prints after granting super user. hope help someone with console:

ON $.$ TO-> $=* doesnt show when you put two with a dot between them.

REVOKE ALL PRIVILEGES ON . FROM ‘usr’@’localhost’; GRANT ALL
PRIVILEGES ON . TO ‘usr’@’localhost’ REQUIRE NONE WITH GRANT OPTION
MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR
0 MAX_USER_CONNECTIONS 0;

and the reverse one, removing grant:

REVOKE ALL PRIVILEGES ON . FROM ‘dos007’@’localhost’; REVOKE GRANT
OPTION ON . FROM ‘dos007’@’localhost’; GRANT ALL PRIVILEGES ON .
TO ‘dos007’@’localhost’ REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS
0;

checked on vagrant should be working in any mysql

Questions:
Answers:

In Sequel Pro, access the User Accounts window. Note that any MySQL administration program could be substituted in place of Sequel Pro.

Add the following accounts and privileges:

GRANT SUPER ON *.* TO 'user'@'%' IDENTIFIED BY PASSWORD