Solved

max_connections_per_hour

Posted on 2008-10-21
3
1,794 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 50

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 50

Accepted Solution

by:
Steve Bink earned 250 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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