Hi, I am having a problem with a MySQL v2 Sensor. I want to monitor a MariaDB (Verion 10.1.44) database on a Debian 9 server. Errormessage: "Unable to connect to any of the specified MySQL hosts.".
I cannot connect to the database from a MySQL Client like HeidiSQL either. The user does have the right privileges on the database and should be allowed to connect. The port is default 3306. The result log of the sensor did not really help me, but i can show you if you want. Someone else had the same issue, you can read it here: https://helpdesk.paessler.com/en/support/solutions/articles/81831-prtg-unable-to-connect-to-mysql Unfortunatly he did not say, how he solved it.
Thanks for help.
Article Comments
Thanks for your reply.
I spent a lot of time trying to figure out what the problem is and just after posting this question here, I found the issue (and it's a bit embarrassing):
The user I created already existed, but was not allowed to connect to the database from the IP of my prtg server.
The new user however did have the right permissions. Somehow, this led to a conflict. If someone else is having the same issue, I found it out with this command:
SELECT User, Host
FROM mysql.user
WHERE Host <> 'localhost';
May, 2020 - Permalink
Hello Jannik,
Happy to hear you got it working. Also, thank you for sharing your solution.
Kind regards,
Sasa Ignjatovic, Tech Support Team
May, 2020 - Permalink
Hello Jannik,
Thank you for your post.
Do I understand you correctly, that you are not able to connect to the database even with a different MySQL client?
If that is the case, then please check if you are able to reach the database server from the PRTG host. Also, make sure that the user that you have entered has the right permissions to connect to the server, and that the SQL is configured to accept remote connections.
Kind regards,
Sasa Ignjatovic, Tech Support Team
May, 2020 - Permalink