臨時設置(重啟mysql后失效)
show variables like 'max_connections';(查可以看當前的最大連接數) set global max_connections=1000;(設置最大連接數為1000,可以再次show查看是否設置成功)
永久設置:
修改mysql配置文件my.ini 或 my.cnf的參數max_connections
文件位置:
windows:一般在C:/ProgramData/MySQL/MySQL Server.../ 下
Linux:我得是在/etc/mysql/my.cnf
如果找不到可以使用命令查找:find / -name my.cnf
添加下面的屬性:
max_connections = 1000
重啟mysql生效,再使用show命令查看
https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=f5v2mcse