Home  >  Article  >  Database  >  mysql提示1203错误解决方案

mysql提示1203错误解决方案

WBOY
WBOYOriginal
2016-06-07 17:52:552240browse

我们的主机经常碰到如mysql提示1203错误下面我来总结一下解决办法。

一、问题

mysql常常报1203错误,超出max_user_connections限制;

二、分析
服务器有长短连接混用

 代码如下 复制代码
max_connections和max_user_connections值同为2048;
SHOW STATUS LIKE ‘%connect%’查看到当前连接数约1100;

三、解决

 代码如下 复制代码
# 更改max_user_connections
SET GLOBAL max_user_connections=0;

# 查看max_user_connections是否生效

 代码如下 复制代码
SELECT @@max_user_connections;

# 查看当前服务器连接数

 代码如下 复制代码
SHOW STATUS LIKE ‘%connect%’;

# 修改my.cnf

 代码如下 复制代码
max_user_connections = 0
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn