How to know about MySQL 'refused connections'

别说谁变了你拦得住时间么 提交于 2019-12-06 02:01:09

问题


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:

  1. Try to isolate users/applications that are using an incorrect password or trying to connect from unauthorized hosts.
  2. A client will be disallowed to connect if it takes more than connect_timeout seconds to connect.
  3. Set the value of log_warnings system variable to 2. This will force the MySQL server to log further information about the error.

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.


回答1:


Solved

log_warnings=2

should have been

log-warnings=2



来源:https://stackoverflow.com/questions/2729170/how-to-know-about-mysql-refused-connections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!