October 28, 2010
Today I experienced one of those errors that are not related to the actual stuff that you are working on, but because of it you can't work on anything else. The error I was getting was:
This started happening while I was testing the DSN creation feature on my employer's website. You know the drill, trying different things, run again, put the wrong settings, run again, put the right settings, run again, and so on; until at one point I started getting the above error.
No problem, I thought, lets restart Tomcat/ColdFusion.... Nope, same error... Let's check with the other devs to see if they have the same problem... Nope, everyone is fine.... Let's manually kill the connections from my host... Nope, same error... Let's drop the database and create it again.... Nope, same error... Let's check the number of connections on the MySQL server.... Nope, they are fine...
The only thing I couldn't do or even try was restarting the MySQL server since it is shared by other users and applications. It was "very" frustrating.
So after a couple of hours of trying different things, I fired up a terminal and tried this:
Lo and behold, finally some light into the issue! The MySQL server was actually blocking my host from connecting to it. I imagine that this was because of the repeated errors while toying with the create dsn functionality. Anyway, after logging into the server from another host and running that command (mysqladmin flush-hosts) I was able to connect again with no problems.
So there you have, if you see that error, it might be that your MySQL server is not liking you at the moment :)