What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

PRTG can not connect to a MySQL database

Votes:

0

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://kb.paessler.com/en/topic/81831-prtg-unable-to-connect-to-mysql Unfortunatly he did not say, how he solved it.

Thanks for help.

mysql-v2-sensor prtg prtg-network-monitor

Created on May 25, 2020 11:47:13 AM



3 Replies

Votes:

0

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

Created on May 26, 2020 6:16:17 AM by  Sasa Ignjatovic [Paessler Support]



Votes:

0

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';

Created on May 26, 2020 12:59:04 PM

Last change on May 27, 2020 9:17:03 AM by  Felix Wiesneth [Paessler Support]



Votes:

0

Hello Jannik,

Happy to hear you got it working. Also, thank you for sharing your solution.


Kind regards,
Sasa Ignjatovic, Tech Support Team

Created on May 26, 2020 1:25:23 PM by  Sasa Ignjatovic [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.