MySQL服务ERROR 1040 (HY000): Too many connections,超出连接限制

    科技2022-08-11  108

    问题描述

    因为一个实训项目小组有五位成员,为保证数据通讯及时,在阿里云服务器搭建了一个MySQL服务可供所有成员同时连接,但是某天开发过程中,出现了这个问题,连云主机都不能用mysql命令进行登录

    解决方案

    先通知连接数据库的相关人员停掉某些,确保你能登陆成功,登陆成功后修改配置表中的max_connections字段

    mysql -u root -p show global status like 'Max_used_connections'; show variables like 'max_connections'; set global max_connections=900; show variables like 'max_connections'; flush privileges;

    Processed: 0.023, SQL: 8