Mysql連線錯誤:Mysql Host is blocked because of many connection errors
環境:linux,mysql5.5.31錯誤: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_connect_errors%';
② 修改max_connection_errors的數量為1000: set global max_connect_errors = 1000;
③ 檢視是否修改成功:show variables like '%max_connect_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/28624388/viewspace-1069939/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Mysql】MySql Host is blocked because of many connection errors;MySqlBloCError
- 【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連線錯誤:Lost connection to Mysql server at 'waiting for initial communication packet'MySqlServerAI
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- mysql連線錯誤(2013)MySql
- mysql遠端連線 Host * is not allowed to connect to this MySQL serverMySqlServer
- mysql連線錯誤碼1251MySql
- 解決Mysql錯誤[1040]Too many connectionsMySql
- 連線MYSQL 錯誤程式碼2003MySql
- Mysql出現連線錯誤解決辦法MySql
- Mysql 錯誤日誌出現大量[Warning] Aborted connection to db user host的解決思路MySql
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- Java專案連線資料庫Mysql報錯create connection SQLExceptionJava資料庫MySqlException
- MySQL連線錯誤(10048)的解決方案MySql
- 連線MySQL出現2013錯誤解決MySql
- MySQL問題處理——1040錯誤Too many connectionsMySql
- Host is not allowed to connect to this MySQL server 錯誤的處理方法MySqlServer
- Mysql連線錯誤ERROR 2003 (HY000)MySqlError
- mysql客戶端連線的幾個常見錯誤MySql客戶端
- phpmyadmin配製連線mysql時出現錯誤(轉)PHPMySql
- 虛擬機器NAT模式下連線mysql報錯:Host '192.168.30.1' is not allowed to connect to this MySQL server虛擬機模式MySqlServer
- 報錯:1130-host ... is not allowed to connect to this MySql server 開放mysql遠端連線 不使用localhostMySqlServerlocalhost
- 透過Amoeba連線mysql報錯MySql
- 【mysql】關於連線mysql資料庫時出現的時區錯誤time zoneMySql資料庫
- Mac SSH 連線出現 Host key verification failed. 錯誤解決MacAI
- 錯誤 101 (net::ERR_CONNECTION_RESET):連線已重置
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- Mysql錯誤集MySql
- qt使用mysql,開啟資料庫,丟擲無法連線錯誤。QTMySql資料庫
- SQLyog連線MySQL8.0報2058錯誤的完美解決方法MySql
- navicat連線MySQL8.0.11報2059錯誤的解決方案MySql
- 連線雲虛擬主機中MySQL資料庫時出現“Too many connections”報錯資訊MySql資料庫
- GO 連線 MySQLGoMySql
- JDBC連線mysqlJDBCMySql
- mysql 連線oracleMySqlOracle
- MySQL字串連線MySql字串