Created
September 1, 2016 20:08
-
-
Save ei-grad/1a4cfa736a431150d6ccbacbe132617c to your computer and use it in GitHub Desktop.
Show mysql grants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql -B -N -e "SELECT DISTINCT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') AS query FROM user ORDER BY user, host" mysql | mysql | grep -v 'Grants for' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment