We are running PHP and MySQL in a MS Azure Website instance. It's been running fine. Today, without us having made any changes, it went down with this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 5.1 Driver]Can't connect to MySQL server on 'localhost' (10061)
/include/inc_database.asp, line 49
Here are some notes on what we've learned:
- We do not have a file in our website named
/inc_database.asp
- The staging version of the site works. When we swap it into the live version, the live version doesn't work.
- Update: it appears that the staging site works only because it doesn't use a custom domain name.
- Update 2: Custom domains work only with the www prefix. That is, www.saltspringstudiotour.ca works whereas saltspringstudiotour.ca doesn't.
- Restarting the website did not fix the problem.
- Is this something to do with a firewall rule?
- We are connecting to a ClearDB MySQL Database.
- The ClearDB Dashboard does not expose firewall configuration settings.
It seems that the problem is associated with using a custom domain without the www prefix.