Reputation: 6573
Having a bit of a problem with mysql...
Mysql 5.1 on windows 2008 server iis7 Site on windows 2003 server iis6 [sorry but can't move to linux kids! ;)]
In the process of shifting a site to a new server so I have moved the database 1st and connected the site to the new database. I tested the connection before moving but now the site is connecting to the new database I am having problems....
connecting via PDO the page hangs for an age before getting 'too many connections' error. Monitoring the server I see MANY threads of: 'unathenticated user' from the ip address of the host the site runs on.
I also see a thread for the connection with the correct user name in my config file and I am a total loss as to what is going on.
Any help would be very much appreciated
Upvotes: 0
Views: 1885
Reputation: 449425
'unathenticated user' from the ip address of the host the site runs on
A stab in the dark, but this could be some script or process trying to connect to the database server with wrong or empty credentials.
Also, here's a report from somebody who had similar problems - in that case, it was the DNS lookup that caused the problem.
I had a similar situation on my setup where the database lived on a different host than the webserver. I found the "unauthenticated users" were connections from the webserver that were hanging on DNS lookups. Don't know if this is a mysql bug or a bug with my firewall / other setup, but a couple of fixes I found were...
1) start mysql with --skip-name-resolve (you may have to change your mysql permission tables to have the host's IP instead of hostname, including localhost)
or 2) add the connecting host to your /etc/hosts file.
Upvotes: 1