方式一: 一次性修改 服务重启后还原
查看 show variables like 'max_connections%'; 修改 set GLOBAL max_connections=1024;
方式二:通过配置文件修改
vi /etc/my.cnf 在[mysqld]下添加 max_connections=1024 保存 重启服务 service mysqld restart