Home > Database > Mysql Tutorial > body text

如何解决MySQL问题主机host_name被屏蔽

WBOY
Release: 2016-06-07 16:06:51
Original
1062 people have browsed it

如果遇到下述错误,表示mysqld已收到来来自主机“host_name”的很多连接请求,但该主机却在中途中断。 由于出现很多连接错误,主机'host_name'被屏蔽。 可使用'mysqladmin flush-hosts'解除屏蔽。 允许的中断连接请求的数目由max_connect_errors系统变量的值

如果遇到下述错误,表示mysqld已收到来来自主机“host_name”的很多连接请求,但该主机却在中途中断。


由于出现很多连接错误,主机'host_name'被屏蔽。

可使用'mysqladmin flush-hosts'解除屏蔽。

允许的中断连接请求的数目由max_connect_errors系统变量的值决定。当超出max_connect_errors规定的连接请求时,mysqld将认为某处出错(例如,某人正试图插入),并屏蔽主机的进一步连接请求,直至执行了mysqladmin flush-hosts命令,或发出了FLUSH HOSTS语句为止。

在默认情况下,mysqld会在10次连接错误后屏蔽主机。你可以通过下述方式启动服务器来调整该值:

<ccid_code>shell> mysqld_safe --max_connect_errors=10000 &</ccid_code>
Copy after login

如果在给定主机上遇到该错误,首先应核实该主机的TCP/IP连接是否正确。如果存在网络问题,增加max_connect_errors变量的值不会有任何好处。

【相关文章】

  • Linux下MySQL数据库二进制日志恢复方法
  • LAMP(Linux+Apache+Mysql+PHP)优化技巧
  • linux下建立mysql镜像数据库


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!