How do I check mysql user have privileges like root user
Posted
by Devara Gudda
on Stack Overflow
See other posts from Stack Overflow
or by Devara Gudda
Published on 2010-03-17T12:26:01Z
Indexed on
2010/03/18
4:11 UTC
Read the original article
Hit count: 329
I use mysql c++ wrapper in client side to connect to mysql server. When user establishes connection to mysql server I want to know whether the user have privileges like root (i.e. GRANT ALL PRIVILEGES ON . TO 'username'@'%' WITH GRANT OPTION).
The 'SHOW GRANTS FOR CURRENT_USER' query gives grants for current user, but i need to parse the string and compare to know whether the current user have privileges like root. I am looking for an alternative options.
Regards,
Devara Gudda
© Stack Overflow or respective owner