mysql error: exceeded the max connections per hour

后端 未结 1 1620
臣服心动
臣服心动 2020-12-11 22:03

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         


        
相关标签:
1条回答
  • 2020-12-11 22:22

    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/

    0 讨论(0)
提交回复
热议问题