mysql user attributes

A

Anonymous

Guest
I Log to Mysql as "USER" and i want to konw which dtatabases and tables can i acces write to insert delete,..., and all my atributes.
 
Use the SHOW command. Looks like "SHOW GRANTS FOR user" is what you're looking for.
 
It generates something like this

GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD 'L337P455W0RD'
GRANT ALL PRIVILEGES ON `DataBase`.* TO 'user'@'localhost' WITH GRANT OPTION



but i have to extract attributes from it and show it like this:

USER DataBase INSERT
USER DataBase DELETE

and so on.....

Can you tell me how can i do this in PHP ??
 
Back
Top