mysql最大错误连接数,mysql错误:超出每小时最大连接数

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)

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

解决方案

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;

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;

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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值