Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

max_connections_per_hour

Posted on 2008-10-21
3
Medium Priority
?
1,997 Views
Last Modified: 2012-05-05
Hi,

I have a contact who is using oscommerce, and is having problems with mysql_connect - error message as follows:
Warning: mysql_connect() [function.mysql-connect]: User 'abc' has exceeded the 'max_connections_per_hour' resource (current value: 300) in /data/htdocs/iabc/shop/includes/functions/database.php on line 19
Unable to connect to database server!

From what I can see from the MySQL site, this relates to mysql server administration and specifically granting priveleges on the account. Can you tell me if this is something only the hosting company can control? If not, any help on changing these limits would be much appreciated!

Many thanks,
Daisy
0
Comment
Question by:daisydoos
  • 2
3 Comments
 
LVL 51

Expert Comment

by:Steve Bink
ID: 22772845
See here:

http://dev.mysql.com/doc/refman/5.1/en/user-resources.html

This is something an administrator can change through GRANTs.
0
 

Author Comment

by:daisydoos
ID: 22773882
Hi there,

Many thanks for your response. I found out a bit more yesterday on this. Do you know what the "sensible" level of max conections per hour is? Can we set it at unlimited?

Many thanks,
Daisy
0
 
LVL 51

Accepted Solution

by:
Steve Bink earned 1000 total points
ID: 22776379
From the same link:

 To remove an existing limit, set its value to zero. For example, to remove the limit on how many times per hour francis can connect, use this statement:

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


I've never used connection limits in my projects because they weren't necessary.  In the context of a web site hitting a database through a controlled API, a limit like this would cause all sorts of issues.  :/
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question