# Pmm-agent with proxysql exporter error: "Error scraping for collect.runtime\_mysql\_servers\\"

**URL:** <https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337>\
**Category:** PMM 2.x\
**Created:** [February 8, 2024, 12:29pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337 "2024-02-08T12:29:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marinse0](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@marinse0](https://forums.percona.com/u/marinse0)\
**Post date:** [February 8, 2024, 12:29pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/1 "2024-02-08T12:29:16Z")

</div>

Dears.  
Having an issue with pmm-agent and proxysql exporter  
Pmm-agent is excessively logging en error in message log, causing log files growth.  
Error is:

```auto
Feb 6 16:48:57 hostname pmm-agent[800105]: time="2024-02-06T16:48:57.876+01:00" level=error msg="ts=2024-02-06T15:48:57.876Z caller=exporter.go:202 level=error msg=\"Error scraping for collect.runtime_mysql_servers\"" agentID=/agent_id/e00df7e2-3a57-4ff1-a036-c0e5015d443b component=agent-process type=proxysql_exporter

```

Running versions

- pmm2-client.x86\_64 2.40.1-6.el9
- proxysql.x86\_64 2.4.8-1.el9

Anyone came across such situation?

Thanks.  
Kind regards,  
Robert

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 8, 2024, 2:33pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/2 "2024-02-08T14:33:28Z")

</div>

Can you `SELECT * FROM runtime_mysql_servers` using the same username/password as the PMM account?

---

<div class="post-metadata">

**Author:** ![marinse0](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@marinse0](https://forums.percona.com/u/marinse0)\
**Post date:** [February 8, 2024, 8:39pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/3 "2024-02-08T20:39:16Z")

</div>

Hi,  
running the command with user used while enabling proxysql metrics returns:

```auto
MySQL [(none)]> SELECT * FROM runtime_mysql_servers;
ERROR 1045 (28000): ProxySQL Admin Error: no such table: runtime_mysql_servers

```

while running as admin user:

```auto
MySQL [(none)]> SELECT * FROM runtime_mysql_servers;
+--------------+-------------+------+-----------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+-------------+------+-----------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 1 | host31.fqdn | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 1 | 0 | |
| 1 | host41.fqdn | 3306 | 0 | ONLINE | 100 | 0 | 1000 | 0 | 1 | 0 | |
| 2 | host31.fqdn | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 1 | 0 | |
| 3 | host31.fqdn | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 1 | 0 | |
| 3 | host41.fqdn | 3306 | 0 | ONLINE | 100 | 0 | 1000 | 0 | 1 | 0 | |
| 4 | host41.fqdn | 3306 | 0 | OFFLINE_HARD | 100 | 0 | 1000 | 0 | 1 | 0 | |
+--------------+-------------+------+-----------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
6 rows in set (0.002 sec)

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 8, 2024, 9:04pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/4 "2024-02-08T21:04:17Z")

</div>

Now you know the reason 😉 Reconfigure pmm-client to use the admin user for proxysql.

---

<div class="post-metadata">

**Author:** ![marinse0](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@marinse0](https://forums.percona.com/u/marinse0)\
**Post date:** [February 9, 2024, 1:02pm UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/5 "2024-02-09T13:02:49Z")

</div>

Thanks. Worked like a charm! Will need to check/adapt the rights for that non-admin user.  
Best,  
Robert

---

<div class="post-metadata">

**Author:** ![Fan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fan/32/40_2.png) [@Fan](https://forums.percona.com/u/Fan)\
**Post date:** [July 19, 2024, 9:13am UTC](https://forums.percona.com/t/pmm-agent-with-proxysql-exporter-error-error-scraping-for-collect-runtime-mysql-servers/28337/6 "2024-07-19T09:13:08Z")

</div>

same error. mysql pmm-client version is 2.40.1. I found that it is because the admin-stats\_credentials user which is pmm doc suggested is not allow to query runtime\_mysql\_servers. I think we should update the doc

## USAGE[¶](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/proxysql.html#usage)

```auto
pmm-admin add proxysql --username=pmm --password=pmm

```

where `username` and `password` are credentials for the administration interface of the monitored ProxySQL instance. You should configure a read-only account for monitoring using the [`admin-stats_credentials`](https://proxysql.com/documentation/global-variables/admin-variables/#admin-stats_credentials) variable in ProxySQL
