Last active
November 18, 2020 01:57
-
-
Save shollingsworth/03375408dd30123353cd117a0bdc6222 to your computer and use it in GitHub Desktop.
mysql show grants for all users dynamic
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
| # show grants for all users one liner | |
| cat <<EOF | mysql | grep SHOW | mysql | sed 's/^Grants/# Grants/' | |
| select distinct concat('SHOW GRANTS FOR ', QUOTE(user), '@', QUOTE(host), ';') as query from mysql.user; | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment