Bug #49408 MEM Manual missing details about agent GRANTS for replication
Submitted: 3 Dec 2009 17:46 Modified: 19 Jan 2010 13:08
Reporter: Leandro Morgado Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Documentation Severity:S3 (Non-critical)
Version:2.1 Docs OS:Any
Assigned to: MC Brown CPU Architecture:Any

[3 Dec 2009 17:46] Leandro Morgado
Description:
The MEM manual states:

" To enable replication discovery to work, you should also grant the SELECT privilege on the mysql.inventory table for each user with replication privileges on the corresponding replication master. This is required to let the MySQL Enterprise Monitor Agent read the replication master UUID. For example:

GRANT SELECT
  ON mysql.inventory
  TO  'replicationuser'@'%'
  IDENTIFIED BY 'replication_password';"
 https://enterprise.mysql.com/docs/monitor/2.1/en/mem-install.html#mem-agent-rights

However, if this is done before the agent is started up and creates the mysql.inventory table, a user will get the following:

ERROR 1146 (42S02): Table 'mysql.inventory' doesn't exist

How to repeat:
Try to issue the GRANT before starting the agent.

Suggested fix:
Make it clear in the documentation that the table must first be created by allowing the agent to run once and connecting to the monitor server. Before issuing the GRANT check for the presence of the table with:

mysql>  SHOW TABLES FROM mysql LIKE "inv%";
[19 Jan 2010 13:08] MC Brown
Fixed - I've added a note that you must have run the agent to create the mysql.inventory table, and added a simple sequence (start agent, stop agent, run GRANT, start agent) to ensure things go smoothly.