MySQL连接(' max_user_connections')

时间:2017-06-08 20:26:54

标签: php mysql

我无法访问我的数据库。我收到以下错误:

 User 'myuser' has exceeded the 'max_user_connections' resource (current value: 5)

在我的PHP代码中,每个打开的连接都会被关闭。而且,据我所知,当PHP脚本完成时,连接会自动关闭。

有没有办法重启服务器或远程关闭所有连接?

2 个答案:

答案 0 :(得分:0)

这应该可以在linux上重启你的mysql服务器

sudo /etc/init.d/mysql restart

答案 1 :(得分:0)

在MySQL配置文件中,设置

max_connections=200

5太低了。您需要重新启动服务器。如果无法重新启动,请在配置文件中进行此设置并在工作台中执行此操作

set global max_connections=200
相关问题