max_connect_errors
C:\Documents and Settings\Administrator>D:\iCloud_1\bin\iCloud_Channel_One.exe
Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Host 'svctag-87f843x
' is blocked because of many connection errors; unblock with 'mysqladmin flush-h
osts'
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings
)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at MySqlDB.Select(String query, String connStr)
at iCloud_Load_Data.DataStore.CreateLoadStoreTable(DateTime dt)
at iCloud_Load_Data.Program.Main(String[] args)
=======================================
经排查,是由于MYSQL数据库的参数:max_connect_errors(系统默认10)
mysqld已经得到了大量(max_connect_errors)的主机’hostname’的在中途被中断了的连接请求累计超过10次,就再也无法连接上mysqld服务,
直到FLUSH HOSTS 或者重启MySQL服务。
==================================================
解决方案
修改智能云服务器上面max_connect_errors参数的值
set global max_connect_errors=1000;
--转自