話說我家的jsp連線到mysql系統忽然不能連線冒出下面錯誤訊息

java.sql.SQLException: null, message from server: "Host 'xx.xxx.com.tw' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

 網路上查的一下

參考

http://blog.blueshop.com.tw/formosa/articles/1814.aspx

Host '...' is blocked錯誤

Host 'hostname' is blocked because of many connection errors.


Unblock with 'mysqladmin flush-hosts'

  這意味著,mysqld已經得到了大量(max_connect_errors)的主電腦'hostname'的在中途被中斷了的連接請求。在 max_connect_errors次失敗請求後,mysqld認定發生錯誤了(象來字一個駭客的攻擊),並且阻止該網站台進一步的連接,直到某人執行指令mysqladmin flush-hosts

缺省地,mysqld10個連接錯誤後阻塞一台主電腦。你可以通過像這樣啟動伺服器很容易地調整它:

shell> safe_mysqld -O max_connect_errors=10000 &

==========================================

問題是我mysql是當初用easyphp裝上去的,我哪知道去哪執行 safe_mysqld

還看到一些文章說可以去修改 my.cnf,在安裝目錄搜尋的半天也沒搜尋到

後來猛然看到一個類似的檔案在C:\Program Files\EasyPHP\mysql  有一個my.ini

 

裡面有一個參數叫max_connections 我把它加到1000並且在下面又增加下列參數max_connect_errors=1000

存檔後重新啟動mysql

arrow
arrow
    全站熱搜

    ROACH 發表在 痞客邦 留言(0) 人氣()