i have to select all users with any privileges to database (e.g. database 'mysql'). Any suggestions? Thanks.
A good view of all users and their approximate privileges. If there is a password, it will by an encrytped string; if not, this field is blank. Select is a very general privlege; insert allows table manipulation within a database; shutdown allows major system changes, and should only be usable by root; the ability to grant permissions is separate from the others.
SELECT user, host, password, select_priv, insert_priv, shutdown_priv, grant_priv
FROM mysql.user
View permissions for individual databases.
SELECT user, host, db, select_priv, insert_priv, grant_priv FROM mysql.db