解決問題:mysql 1040 too many connections
當項目mysql數據庫連接太多-報錯--1040 too many connection
重啟mysql 服務器 (systemctl restart mysqld.service)
1、mysql -u root -p 回車輸入密碼進入mysql
2、執行show variables like "max_connections"; (查詢當前的最大連接數)
3、執行set GLOBAL max_connections=10000; (修改最大連接數)
4、執行show variables like "max_connections";
此時就解決了!
注意:mysql服務器重啟之后就會恢復默認的最大連接!