1.使用命令show variables 來查看當前最大連接數
show variables like '%max_connections%';
使用命令set global max_connections來設置最大連接數:
set global max_connections=1400;
使用命令show variables 來查看是否已經生效。如果顯示數字為你所設置的新的值,說明生效。
2.修改my.conf里面的max_connections為你希望的新數值,以使下次重啟后生效。
推薦閱讀: