最近重启服务器的mysql总是报大量的如下错误:
160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 139 user: ‘root‘ 160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 138 user: ‘root‘ 160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 137 user: ‘root‘ 160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 136 user: ‘pdss‘ 160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 131 user: ‘root‘ 160330 9:14:26 [Warning] /usr/libexec/mysqld: Forcing close of thread 130 user: ‘csm‘
这个错误其实是mysql在对DNS做反查,由于反查的接续速度过慢,大量的查询处理不及时,线程得不到释放,造成MySQL“ 假死”。
解决办法:
linux服务器
修改mysql的配置文件(my.cnf)在[mysqld]下添加:
skip-name-resolve
windows服务器
修改mysql的配置文件(my.ini)在[mysqld]下添加:
skip-locking skip-name-resolve
修改完成后,重启mysql服务。
本文出自 “Garany.Wang” 博客,请务必保留此出处http://garany.blog.51cto.com/7342714/1758279
Mysql报错Forcing close of thread 139 user: 'root'
原文地址:http://garany.blog.51cto.com/7342714/1758279