MySQL Forums
Forum List  »  General

information_schema.TABLES privs
Posted by: Tomasz Kłoczko
Date: March 21, 2016 03:01AM

Hi,

I'm working on mysql (5.6) monitoring.
One of the things which I'm going to implement is summary monitoring of all data and indexes size per database.
On testing obtaining exact data I can form query which is working from root user but is not working from my test monitoring user.

$ mysql -uroot -sNe "select SUM(DATA_LENGTH) from information_schema.TABLES where TABLE_SCHEMA='test';"
3046817792

$ mysql -umonitoring -sNe "select SUM(DATA_LENGTH) from information_schema.TABLES where TABLE_SCHEMA='test';"
ERROR 1045 (28000): Access denied for user 'monitoring'@'localhost' (using password: NO)

$ mysql -uroot -sNe "SHOW GRANTS FOR 'monitoring'@'localhost';"
GRANT USAGE ON *.* TO 'monitoring'@'localhost' IDENTIFIED BY PASSWORD '<pwd_hash'

With USAGE priv I can access to all other things but seems information_schema.TABLES is tricky.

Can someone give me hint what kind of other privs I need to add to monitoring@localhost account to make above working?

Options: ReplyQuote


Subject
Written By
Posted
information_schema.TABLES privs
March 21, 2016 03:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.