Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
mysql show grants snippet
# Show all grants
mysql --skip-column-names -e "SELECT user, host FROM mysql.user" | sed 's/\t/"@"/g; s/^/SHOW GRANTS FOR "/g; s/$/";/g;' | mysql --skip-column-names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment