# Qan mysql perfschema agent status is waiting

**URL:** <https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264>\
**Category:** MySQL & MariaDB\
**Created:** [March 21, 2024, 2:11am UTC](https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264 "2024-03-21T02:11:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronl](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ronl/32/15737_2.png) [@Ronl](https://forums.percona.com/u/Ronl)\
**Post date:** [March 21, 2024, 2:11am UTC](https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264/1 "2024-03-21T02:11:55Z")

</div>

Just new in setting up percona.

Followed all the instructions in the Quick install guide.  
Able to setup the server and client but when checking on invetory \> services, the _Qan mysql perfschema agent_ is still on waiting status.

Running `pmm-admin list` in the client gives me `mysql_perfschema_agent waiting` as well.

Not sure what I am missing here

---

<div class="post-metadata">

**Author:** ![nurlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nurlan/32/1523_2.png) [@nurlan](https://forums.percona.com/u/nurlan)\
**Post date:** [March 21, 2024, 12:22pm UTC](https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264/2 "2024-03-21T12:22:03Z")

</div>

Hi, could you run `pmm-admin summary` and check logs for this agent if there are any error?  
Could you also check if the user set for pmm has read access to `performance_schema.events_statements_history` and `performance_schema.events_statements_summary_by_digest`?

Thank you

---

<div class="post-metadata">

**Author:** ![Ronl](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ronl/32/15737_2.png) [@Ronl](https://forums.percona.com/u/Ronl)\
**Post date:** [March 23, 2024, 11:21am UTC](https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264/3 "2024-03-23T11:21:52Z")

</div>

Hi @nurlan

I did `pmm-admin summary` and dont see any error in the logs

How do I exactly do this part?

Could you also check if the user set for pmm has read access to `performance_schema.events_statements_history` and `performance_schema.events_statements_summary_by_digest`

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [March 24, 2024, 7:31pm UTC](https://forums.percona.com/t/qan-mysql-perfschema-agent-status-is-waiting/29264/4 "2024-03-24T19:31:41Z")

</div>

Hi @Ronl  
For the QAN source of Performance Schema you need to ensure the following are true:

- Performance Schema is enabled: `show global variables like 'performance_schema'`
- PMM user has privileges to read (SELECT) from Performance Schema: `show grants for 'YourPmmUser'`
- There are records appearing in the events\_statements tables: `SELECT COUNT(1) FROM performance_schema_events_statements_history`

If you could share the above results with us we can then advise you further. Thank you for posting to the Percona forums!
