SHOW VARIABLES LIKE 'max_connections';
SHOW GLOBAL STATUS LIKE 'Max_used_connections';


##max_connections 显示 MySQL 实例允许的最大连接数。
##Max_used_connections 显示 MySQL 实例中已经使用的最大连接数。


#调整最大连接数:
#找到配置文件中的 max_connections 参数,并将其增加到一个更合适的值。例如,增加到 200 或更高,取决于你的数据库负载和需求:
[mysqld]
max_connections = 200
#保存文件后重启