I am using MONyog to montitor my two mysql servers. I get alert emails from MONyog when something goes wrong. There is an error I could not find out why. It says:
Connection History: Percentage of refused connections) - 66.67%
the percentage is not important, this is just about having refused connections. I get this email every half an hour. So this is like a constant situation. This must be my mistake, because I just set up those servers and there is no chance somebody else could be interfering the servers.
MONyog advices me:
I added log_warnings=2
to my.cnf
and I enabled logging like this:
[mysqld_safe]
.
.
log_warnings=2
log-error = /var/log/mysql/error.log
.
.
.
.
[mysqld_safe]
.
log-error=/var/log/mysqld.log
.
.
I cannot see any warnings at /var/log/mysql/error.log
I can see some warnings at /var/log/mysqld.log
but they are about something else.
In sum, my question is how can I detect refused connections? Please let me know if any more info is required.
Thanks in advance.
Check that the DB username, DB password, database host, and database port are correct. (if you are unsure, reach out to your database administrator or check in your web hosting account for the up to date credentials). If the config file references host = "localhost" , you can try to change it to 127.0.
A Connection Refused (IP Address) error occurs when: You use the wrong IP address in the connection string. Use the database's private IP address in the connection string and try to connect from a Droplet that isn't allowed to access the VPC network.
Solved
log_warnings=2
should have been
log-warnings=2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With