Mysql database forum error: max_user_connections

November 25, 2008 · Print This Article

Picture of error mysql database error imageSometimes I got this database error message from one of my website forum : “mysql_connect() [function.mysql-connect]: User mydatabase already has more than ‘max_user_connections’ active connections”

The error of max user connections that occurred happens when an account on the server is opening to many connections to mysql on the server. This happens sometimes with poorly written code that leaves connections open and keeps opening more connections. When one account does this it affects the entire mysql server resulting in the error you received and is only fixed when we find the issue and stop those lingering connections. Please note the same at your end.

It seems that the forum script is generating too many mysql connections at a time. I would like to suggest you a couple of things which you should always keep in mind.

1. Check that your PHP code and any other tools always close connections – many database servers require this, and it is good practice.

2. Use mysql_connect() instead of mysql_pconnect() unless you have a good reason to do so.

3. Always put a mysql_close() in the scripts you are using.

Hope it helps!

Popularity: 27%

Incoming search:

mysql connection max_user_connections

Possible Related Post:
How to Choose Free Hosting PHP
Cash Forum Online
How to make your Error 404 Pages Useful
Solve the Problem from Your PC
Test the limit post

Comments

Got something to say?