2014-02-25 12 views
0
我使用笨的一個項目

,每當我嘗試連接到從我的開發機器的分貝,我總是得到這個錯誤不斷收到失敗連接到數據庫

Cannot connect to the database because: Host '**' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 

其中**是封鎖IP地址。

所以我昨天沖洗了我的主人,今天又發生了。但是數據庫的憑證是正確的。什麼可能是其他原因造成這種情況?我該如何去調查呢?

+0

請註明連接代碼 –

回答

1

請用這個增幅最大誤差遭遇與MySQL:

shell> mysqld_safe --max_connect_errors=10000 & 
+0

任何爲什麼這種錯誤仍然會發生? – edelweiss

0

這意味着mysqld已經收到和已經在中間中斷了給定主機多的連接請求。

默認情況下,mysqld在10次連接錯誤後阻塞主機。您可以通過在服務器啓動時設置max_connect_errors次調整值:

shell> mysqld_safe --max_connect_errors=10000 & 

值也可以在運行時設置:

mysql> SET GLOBAL max_connect_errors=10000; 

欲瞭解更多詳情,請參閱,http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html