Solved

max_connections_per_hour

Posted on 2008-10-21
3
1,723 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now