Friday, September 28, 2012

Show MySQL permissions AKA GRANTS

Listing current permissions including passwords in MySQL can be easily achieved using show-grants-mysql.sh POB script, for example:
 
$ MYSQL_PASSWORD=myPassword
$ history -d $((HISTCMD-2)) && ./show-grants-mysql.sh "-u root -p$MYSQL_PASSWORD"
$ MYSQL_PASSWORD=
Note the pasword doesn't stay in the history which is a wise thing to do.

No comments:

Followers