文章出處
文章列表
近在用SpringMVC開發的時候,突然出現1040 too many connection的錯誤,看錯誤的意思是連接的人數太多了。百度經驗:jingyan.baidu.com
方法/步驟
-
當最大連接數比較小時,可能會出現“1040 too many connection”錯誤。
首先需要重啟mysql服務,執行命令:service mysql restar
也有可能是:service mysqld restart
-
登錄mysql:mysql -uroot -p
輸入密碼,回車;
-
登錄成功后執行以下語句查詢當前的最大連接數:select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME='MAX_CONNECTIONS';
-
執行以下語句修改最大連接數:set global max_connections = 3600;
文章列表
全站熱搜