patkua@work

Resetting grant privileges on mysql root

We had a root mysql user account given to us for a MySQL database but somehow that account did not have the ability to GRANT others any privileges. Running:

select user, grant_priv from mysql.user

showed us that no users had that. A bit of searching around and I stumbled across this blog that demonstrated how. Running the following seemed to work:

update mysql.user set grant_priv = 'Y' where user = 'root'; commit; flush privileges;

Rerunning:

select user, grant_priv from mysql.user

now showed us that the root user had the GRANT ability. The following command also confirmed it:

show grants

Exit mobile version