1. 程式人生 > >c3p0 報錯APPARENT DEADLOCK!!!

c3p0 報錯APPARENT DEADLOCK!!!

今天在除錯javaee工程,之前一直好好的,突然出現報錯 c3p0  APPARENT DEADLOCK!!! ,網上搜索了半天,嘗試各種解決方法,也沒好。是在沒辦法了,這是看到後面的錯誤裡有MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts,哈哈終於找到了解決辦法。

使用mysqladmin flush-hosts 命令清理一下hosts檔案(不知道mysqladmin在哪個目錄下可以使用命令查詢:whereis mysqladmin);

  ① 在查詢到的目錄下使用命令修改:/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd;