Mysql报错Forcing close of thread 139 user: 'root'

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql报错Forcing close of thread 139 user: 'root'相关的知识,希望对你有一定的参考价值。

最近重启服务器的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'的主要内容,如果未能解决你的问题,请参考以下文章

docker启动mysql报错Can't read dir of '/etc/mysql/conf.d/'

Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by se

远程mysql报错GHost ‘xxx‘ is not allowed to connect to this MySQL serverConnection closed by foreign host

MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated col

mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例

mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例