Skip to content
Advertisement

How to change max_connections_per_hour in XAMPP?

In my production environment I’m getting this error:

User 'GirkovArpa' exceeded the 'max_connections_per_hour' resource (current value: 500)

I don’t have this problem in my development environment so I need to set the max_connections_per_hour to 500 in order to replicate it.

How do I do this? My database is run from the XAMPP control panel.

I don’t see this variable name in my.config, which is also accessed from the XAMPP control panel.

I’m on Windows.

Advertisement

Answer

This is a MySQL account resource limit that is designed to limit the resource comsuption of the server.

If you are fine with allowing more hourly connections to that user, you can change the value of the parameter. I don’t know if this can be controlled from xamp, but, in pure SQL, the following SQL statement would get the job done:

ALTER USER 'GirkovArpa'@'???' WITH MAX_CONNECTIONS_PER_HOUR 1000;

… where ??? is the name of your server.

A 0 value disables the limit.

There are other limitations that you might want to check:

MAX_QUERIES_PER_HOUR -- The number of queries an account can issue per hour 
MAX_UPDATES_PER_HOUR -- The number of updates an account can issue per hour 
MAX_USER_CONNECTIONS -- The number of simultaneous connections to the server by an account 
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement