【Mysql】MySql Host is blocked because of many connection errors;
錯誤:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
原因:
同一個ip在短時間內產生太多(超過mysql資料庫max_connection_errors的最大值)中斷的資料庫連線而導致的阻塞;
解決方法:
1、提高允許的max_connection_errors數量(治標不治本):
① 進入Mysql資料庫檢視max_connection_errors: show variables like '%max_connection_errors%';
② 修改max_connection_errors的數量為1000: set global max_connect_errors = 1000;
③ 檢視是否修改成功:show variables like '%max_connection_errors%';
2、使用mysqladmin flush-hosts 命令清理一下hosts檔案(不知道mysqladmin在哪個目錄下可以使用命令查詢:whereis mysqladmin);
① 在查詢到的目錄下使用命令修改:/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd;
備註:
其中埠號,使用者名稱,密碼都可以根據需要來新增和修改;
配置有master/slave主從資料庫的要把主庫和從庫都修改一遍的(我就吃了這個虧明明很容易的幾條命令結果折騰了大半天);
第二步也可以在資料庫中進行,命令如下:flush hosts;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29096438/viewspace-2132194/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【MySQL】Host is blocked because of many connection errorsMySqlBloCError
- Mysql連線錯誤:Mysql Host is blocked because of many connection errorsMySqlBloCError
- Mysql host is blocked because of many connection errors;unblock解決方法MySqlBloCError
- 從原始碼解析ERROR 1129 (HY000):Host is blocked because of many connection errors原始碼ErrorBloC
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- MySQL: Too many connectionsMySql
- mysql slave-skip-errorsMySqlError
- mysql connection refusedMySql
- MySQL Study之–Mysql啟動失敗“mysql.host”薦MySql
- MySQL:Lost connection to MySQL server at 'readingMySqlServer
- 【問題解決】java.sql.SQLException: null, message from server: “Host ‘xxx.xx.xx.xxx‘ is blocked because ofJavaSQLExceptionNullServerBloC
- Connection could not be established with host 求救
- Check connection related issue of mysqlMySql
- MySQL ERROR 1040: Too many connectionsMySqlError
- 【MySQL】Too many connections 案例一則MySql
- mysql遠端連線 Host * is not allowed to connect to this MySQL serverMySqlServer
- MySQL-1130-host ... is not allowed to connect to this MySql serverMySqlServer
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- Mysql 錯誤日誌出現大量[Warning] Aborted connection to db user host的解決思路MySql
- Swift:Errors thrown from here are not handled because the enclosing catch is not exhaustiveSwiftError
- Dr.Elephant mysql connection errorMySqlError
- Dr.Elephant mysql connection error薦MySqlError
- mysql備份提示 too many open files Errornumber 24MySqlError
- 關於mysql的Too many connections問題MySql
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- Mysql mysql lost connection to server during query 問題解決方法MySqlServer
- mysql5.5_2013 Lost connection to Mysql server during queryMySqlServer
- 解決Mysql錯誤[1040]Too many connectionsMySql
- mysql的max_connections和Too many connectionsMySql
- Mysql中too many connections問題的解決MySql
- MySQL效能引數詳解 - max_connect_errorsMySqlError
- 【MySQL】Testing mysql connection and privileges..ERROR 1173 (42000)MySqlError
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- 解決mysql Navicat 出錯:1130-host . is not allowed to connect to this MySql server,MySqlServer
- mysql error 2005 - Unknown MySQL server host 'localhost'(11001)MySqlErrorServerlocalhost
- ssh: connect to host localhost port 22: Connection refusedlocalhost
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- Mysql 如何更改default collation_connection settingMySql