What about SHOW GRANTS FOR 'user'@'host' ??
Refer https://dev.mysql.com/doc/refman/5.6/en/show-grants.html On Wed, Apr 15, 2015 at 7:45 PM, Rasmus Johansson <[email protected]> wrote: > Hi, > > I was wondering if there is a straight forward way to check whether a user > has SUPER privileges or not. > > I came up with doing the following: > > --check for user’s Super_Priv on the current host > SELECT Super_Priv FROM mysql.user WHERE user = 'user1' AND host = 'host1'; > --and then also check for user on whatever (%) host: > SELECT Super_Priv FROM mysql.user WHERE user = 'user1' AND host = '%' > > But is there some more convenient way of doing it, maybe using SHOW GRANTS? > > Rasmus > > -- > > Rasmus Johansson, VP Engineering > MariaDB | t: +358 50 499 9589 | Skype: ratzpo > _______________________________________________ > Mailing list: https://launchpad.net/~maria-discuss > Post to : [email protected] > Unsubscribe : https://launchpad.net/~maria-discuss > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp

