为什么MySQL连接被阻止了很多连接错误? [英] Why MySQL connection is blocked of many connection errors?

查看:475
本文介绍了为什么MySQL连接被阻止了很多连接错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以看到我在数据库连接上有问题。它给我这个错误:

As you can see I have a problem on a database connection. It gives me this error:


...因为许多连接错误而被阻止

...is blocked because of many connection errors

我搜索了一些答案,但我不能解决我的问题。

I searched some answers but I couldn't solve my problem.

我不知道我是否提供了您需要的所有信息,因此如果您需要其他信息,只需告诉我。我有一个来自不同计算机的数据库连接,我有一个用户创建访问数据库,但它在主机行中有,所以我想用IP地址为安全问题,它给了我这个错误,所以现在我被卡住了。

I don't know if I gave all the information that you need, so if you need something else, just tell me. I have a database connection from different computers and I had a user created to access the database but it had % in the hosts row, so I wanted to change it with an IP address for security issues and it gave me this error so now I'm stuck.

推荐答案

MySQL阻止客户端连接时出现错误,以保护MySQL不受格式不当的客户端影响。

MySQL blocks clients which error made while connecting to protect MySQL from malformed client.

所以首先,你需要找到什么样的错误是....

So first, you need to find what sort of error is....

你可以检查数据目录中的MySQL错误日志。 (通常 hostname.err

You might check MySQL error log in data directory. (typically hostname.err)

或者,您可以增加 max_connect_errors 电流值?)最大值取决于架构。在32位,4294967295。18446744073709547520为64位。 (手动

Or, you can increase max_connect_errors (what is current value?) maximum value depends on architecture. on 32 bit, 4294967295. 18446744073709547520 for 64 bit. (Manual)

mysql> SET GLOBAL max_connect_errors = 100000000;

但是如果经常发生错误,这不是真正的解决方案。

But this is not real solution if error is frequently occurred.

FLUSH HOSTS 可以帮助您消除受阻主机。

FLUSH HOSTS can help you to eliminate blocked host right now.

mysql> FLUSH HOSTS;

如果要从外部运行mysql控制台,请使用mysqladmin命令:

If want to run from outside mysql console then use mysqladmin command:

# mysqladmin flush-hosts

这篇关于为什么MySQL连接被阻止了很多连接错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆