Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a few servers running WordPress. I am using IIS with MySQL. One keeps faulting; I reset the MySQL server and it works well for a few hours and after that I start getting "Error establishing a database connection".

The MySQL is up and I can log in to it as root or regular user, locally or remotely. I see nothing special in SHOW PROCESSLIST;, but the aborted connections do increase.

I'm running on a Win2008R2; my other servers are MUCH busier - the one that is not working is my QA server. I copied the my.ini configuration from the working servers to make sure this server can handle as many connections (initially it was set much lower as it is not production; in the installation I also chose DEV server and not production server), but it doesn't help. Another thing that helps is mysqladmin flush-hosts from the command line.

Where should I look? What should I do?...

share|improve this question
    
Do you see any relevant errors in your error log ? –  Iain May 16 '11 at 18:13
    
Nope, I checked windows events, mysql log and php log. I see myself restarting the server, but no 'refused connection' or such message. –  mik May 17 '11 at 11:53

1 Answer 1

up vote 1 down vote accepted

http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html

mysql> show variables;

take a look variable max_connect_errors, you can try increase it.

share|improve this answer
    
I see it is at 10; I'm increasing it. However, the WP is on the same server and I can connect locally without a problem as root or aas the WP user. Where will I see an error that relates to this? I looked att the logs but saw nothing like in the article you linked to. –  mik May 17 '11 at 11:54
    
it's should be on your webserver/php log, but if cannot found, cmiiw wordpress has debug setting (codex.wordpress.org/Editing_wp-config.php#Debug) you may enabled it and see what's the real problem. –  chocripple May 17 '11 at 13:53
    
I found the error. I see in my other servers that the max_connected_errors is 64 so I'll try to increase it, but I would like to do it through a configuration change... I only saw it altered by command-line execution of mysql. I didn't find it at my.ini. Any idea? –  mik May 18 '11 at 15:18
    
you just add the option on your my.ini under [mysqld] section, please refers to linuxweblog.com/tune-my.cnf –  chocripple May 19 '11 at 2:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.