ivinco
[SOLVED] PMM Server Installation Error – Connection Check Failed: Error 1130: Host Is Not Allowed To Connect To This Server.

[SOLVED] PMM Server Installation Error – Connection Check Failed: Error 1130: Host Is Not Allowed To Connect To This Server.

Mykhailo LiepieshkoMykhailo Liepieshko··Updated

MySQL Error 1130 ("Host is not allowed to connect to this server") during PMM setup means the pmm user either doesn't exist for the host pmm-agent is connecting from, or doesn't have permission. The fix is to create the user with the right host/IP and grant the standard PMM permissions: SELECT, PROCESS, REPLICATION CLIENT, RELOAD (plus BACKUP_ADMIN on MySQL 8.0).

If you get this type of error, it means that you need to create right access for pmm user to database.

You can check current permissions for the pmm users by the SHOW GRANT queries.

SHOW GRANTS FOR 'pmm';

SHOW GRANTS FOR 'pmm'@'XXX.XXX.XXX.XXX';

The request should return a response like this:

+--------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for pmm@XXX.XXX.XXX.XXX                                                                                                                      |
+--------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, RELOAD, PROCESS, REPLICATION CLIENT ON *.* TO 'pmm'@'XXX.XXX.XXX.XXX' IDENTIFIED BY PASSWORD 'XXX' |
+--------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Probably in case of a problem, the request will return a similar error to this:

ERROR 1141 (42000): There is no such grant defined for user 'pmm' on host 'XXX.XXX.XXX.XXX'

So the fix in this situation would be to create a user with the right permissions:

On MySQL 8.0

CREATE USER 'pmm'@'XXX.XXX.XXX.XXX' IDENTIFIED BY 'PASSWORD' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON. TO 'pmm'@'XXX.XXX.XXX.XXX';

On MySQL 5.7

CREATE USER 'pmm'@'[XXX.XXX.XXX.XXX](http://xxx.xxx.xxx.xxx/)' IDENTIFIED BY 'PASSWORD' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'[XXX.XXX.XXX.XXX](http://xxx.xxx.xxx.xxx/)';

And after creating the user, you need to flush the privileges

FLUSH PRIVILEGES;

Need help running PMM at scale or troubleshooting database monitoring infrastructure? See our development services.

Frequently Asked Questions

What does MySQL Error 1130 mean during PMM installation?

It means MySQL refused the incoming connection because there is no pmm user defined for the IP address or host that pmm-agent is connecting from. MySQL accounts are scoped to user@host, so a pmm user that exists for localhost won't authorize a connection coming from another machine. You need to create the user with the right host pattern.

What permissions does the PMM user need on MySQL?

PMM needs SELECT, PROCESS, REPLICATION CLIENT, RELOAD for monitoring server state and replication. On MySQL 8.0, also grant BACKUP_ADMIN to support newer features. The grants must be on *.* (global) since PMM samples performance schema, status variables, and replication metrics across the whole instance.

Why use MAX_USER_CONNECTIONS for the PMM user?

MAX_USER_CONNECTIONS 10 caps how many concurrent connections the pmm user can hold open. This protects the database from runaway connection growth if a pmm-agent gets stuck in a reconnect loop or runs many parallel exporters. Ten is enough for normal monitoring; raise it only if you see exporter timeouts attributed to connection limits.

Do I need to FLUSH PRIVILEGES after creating the PMM user?

Yes, if you used GRANT against mysql.* system tables directly. If you used CREATE USER and GRANT statements (the recommended path), MySQL applies the changes immediately and FLUSH PRIVILEGES is technically not required — but running it is harmless and confirms the new user is active.