#连接数 151改1000
mysql -u root -p
set GLOBAL max_connections=1000;
show variables like 'max_connections';
vi /etc/my.cnf
max_connections=1000
systemctl restart mysqld
如何将MySQL的最大连接数从151增加到1000
该文章指导读者如何修改MySQL的配置,将最大允许的连接数从151提升至1000。首先,通过命令行工具更改全局变量`max_connections`,然后编辑`/etc/my.cnf`配置文件设置同样的值,最后重启mysqld服务以应用更改。
#连接数 151改1000
mysql -u root -p
set GLOBAL max_connections=1000;
show variables like 'max_connections';
vi /etc/my.cnf
max_connections=1000
systemctl restart mysqld

被折叠的 条评论
为什么被折叠?