mySQL 错误日志分析

https://github.com/twitter/mysql/commit/1912d02a461797977219e2578080b790020ad845

 

https://github.com/twitter/mysql/blob/master/sql/hostname.cc

 错误:

130111  3:33:55 [Warning] IP address '74.86.110.133' has been resolved to the host name '74.86.110.133-static.reverse.softlayer.com', which resembles IPv4-address itself.

130111  4:00:00 [Note] /usr/sbin/mysqld: Normal shutdown

 

130111  4:00:00 [Note] Event Scheduler: Purging the queue. 0 events

130111  4:00:02 [Warning] /usr/sbin/mysqld: Forcing close of thread 410210  user: 'root'

 

http://dev.mysql.com/doc/refman/5.5/en/host-cache.html DNS 高速缓存 问题

 

http://dev.mysql.com/doc/refman/5.5/en/blocked-host.html  解决方案

 

SET GLOBAL max_connect_errors=10000;

 

错误日志有类似警告:

120119 16:26:04 [Warning] IP address '192.168.0.110' could not be resolved: Name or service not known

120119 16:26:04 [Warning] IP address '192.168.0.104' could not be resolved: Name or service not known

120119 16:26:04 [Warning] IP address '192.168.0.147' could not be resolved: Name or service not known

通过show processlist发现大量类似如下的连接:

|592|unauthenticated user|192.168.3.20:35320|NULL|Connect| |login|NULL|
|593|unauthenticated user|192.168.3.20:35321|NULL|Connect| |login|NULL|
|594|unauthenticated user|192.168.3.20:35322|NULL|Connect| |login|NULL|

 

skip-name-resolve 参数的目的是不再进行反解析(ip不反解成域名),这样可以加快数据库的反应时间。

修改配置文件添加并需要重启:

[mysqld] 

skip-name-resolve

添加后发现错误日志有

120203 10:21:06 [Warning] 'user' entry 'root@r590ubuntu' ignored in --skip-name-resolve mode.
120203 10:21:06 [Warning] 'user' entry '@r590ubuntu' ignored in --skip-name-resolve mode.

只需去服务器里边把用户root@r590ubuntu和@r590ubuntu删除即可。

 

错误:

:57 [Note] Flashcache bypass: disabled

130116 20:14:57 [Note] Flashcache setup error is : ioctl failed

 

地址: http://bugs.mysql.com/bug.php?id=64927

 

130201  3:29:07 [Warning] IP address '222.217.223.49' could not be resolved: Temporary failure in name resolution

http://blog.csdn.net/lxpbs8851/article/details/7892256

解决方案:

[mysqld]

--skip-host-cache
--skip-name-resolve

 

posted @ 2013-03-04 11:38  jackluo  阅读(12746)  评论(0编辑  收藏  举报