mysql错误:超出了每小时的最大连接数 [英] mysql error: exceeded the max connections per hour

查看:362
本文介绍了mysql错误:超出了每小时的最大连接数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在同一域上为Wordpress网站运行php脚本时出现错误:

I'm getting an error while running php script for Wordpress site on same domain:

Could not connect: User 'abc' has exceeded the 'max_connections_per_hour' resource (current value: 10)

MySql数据库的限制应该是多少?现在我应该连接到数据库吗?

What should be the limit for MySql database? Now should I connect to the database?

推荐答案

您超出了mysql的限制,请查看mysql文档,您会看到以下内容:

You exceed limit for mysql, take a look at mysql doc, and you can see this :

mysql> GRANT ALL ON customer.* TO 'francis'@'localhost'
->     IDENTIFIED BY 'frank'
->     WITH MAX_QUERIES_PER_HOUR 20
->          MAX_UPDATES_PER_HOUR 10
->          MAX_CONNECTIONS_PER_HOUR 5;

您只需要增加MAX_CONNECTIONS_PER_HOUR或取消限制,只需使用以下方法即可:

You just have to increase MAX_CONNECTIONS_PER_HOUR or to remove limit, just use this :

mysql> GRANT USAGE ON *.* TO 'francis'@'localhost'
->     WITH MAX_CONNECTIONS_PER_HOUR 0;

要允许在WordPress上进行持久连接,请看一下这篇文章(我尚未测试自己):

To allow persistant connexion on WordPress, take a look at this article (I have don't tested my self) : http://www.mydigitallife.info/using-php-mysql-persistent-connections-to-run-wordpress-blog/

这篇关于mysql错误:超出了每小时的最大连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆