I got the error 2 scare, read and tried the possible solutions that were posted, but no luck. But they lead me in the right direction, so here's my solution for future ppl who are frantically reading this thread for help.
I changed the $mosConfig_host to actual IP # of the mySQL host. The previously mentioned localhost and 127.0.0.1 are basically the same thing that may be routed to actual SQL server. Your host's Control Panel should list the SQL host name (something like mysql.hostname.com). If you're lucky it will also list the IP #, otherwise ask your host for actual #.
I also have a ticket in with my host b/c the host name, host IP #, localhost, and 127.0.0.1 should all end up at the same SQL server, so there must be a routing problem somewhere. This is especially the case if this problem just pops up, and is not due to a new install or some other recent update.
Well, if you are reading this, Good Luck