【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 errors;unblock解決方法MySqlBloCError
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- MySQL:Lost connection to MySQL server at 'readingMySqlServer
- 【問題解決】java.sql.SQLException: null, message from server: “Host ‘xxx.xx.xx.xxx‘ is blocked because ofJavaSQLExceptionNullServerBloC
- MySQL ERROR 1040: Too many connectionsMySqlError
- MySQL-1130-host ... is not allowed to connect to this MySql serverMySqlServer
- Check connection related issue of mysqlMySql
- Connection could not be established with host 求救
- Mysql 錯誤日誌出現大量[Warning] Aborted connection to db user host的解決思路MySql
- [20230104]Oracle too many parse errors PARSE ERROR.txtOracleError
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- “Host ‘xxxx‘ is not allowed to connect to this MySQL server“MySqlServer
- Dr.Elephant mysql connection errorMySqlError
- Please specify (single) host string for connection:
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- Mysql mysql lost connection to server during query 問題解決方法MySqlServer
- mysql備份提示 too many open files Errornumber 24MySqlError
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- Mysql 如何更改default collation_connection settingMySql
- ssh: connect to host localhost port 22: Connection refusedlocalhost
- 解決MySql報錯:1130 - Host ‘xxx‘ is not allowed to connect to this MySQL server的方法MySqlServer
- MySQL報錯ERROR 2013 (HY000): Lost connection to MySQL server during queryMySqlErrorServer
- MySQL問題處理——1040錯誤Too many connectionsMySql
- Host 'xxx' is not allowed to connect to this MySQL server 解決方法MySqlServer
- Oracle資料庫出現WARNING: too many parse errors告警的分析思路Oracle資料庫Error
- The slave I/O thread stops because master and slave have equal MySQL server UUIDthreadASTMySqlServerUI
- mysqldump: Error 2013: Lost connection to MySQL server during query when dumpingMySqlErrorServer
- 虛擬機器NAT模式下連線mysql報錯:Host '192.168.30.1' is not allowed to connect to this MySQL server虛擬機模式MySqlServer
- 坑:ssh: connect to host github.com port 22: Connection refusedGithub
- The connection to the server 10.10.0.2:6443 was refused - did you specify the right host or port?Server
- MySQL:slave_skip_errors引數對MGR可用性的影響MySqlError
- ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization paErrorMySqlServer
- 異常解決——GitLab : ssh: connect to host port 22: Connection refusedGitlab
- navicat無法連線遠端的mysql--Host ‘xx.xx.xx.xx‘ is not allowed to connect to this MySQL server“MySqlServer
- 安裝MySQL出現Job for mysqld.service failed because the control process exited with error codeMySqlAIError
- 解決 ssh connect to host github.com port 22 Connection timed outGithub
- mysql會話控制限制登入次數(connection_control外掛)MySql會話
- Java專案連線資料庫Mysql報錯create connection SQLExceptionJava資料庫MySqlException