kreut — 2011-03-29T07:33:46-04:00 — #1
I'm in the process of uploading my first site with a database to GoDaddy.com. I managed to get the database up in addition to my site itself. Now if only they would talk to one another! I'm getting the error "SQLSTATE[HY000]  Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)".
Any help would be appreciated: I feel so close yet so far.
system — 2011-03-29T07:43:27-04:00 — #2
Magento? Are they on the same server? Did you edit Magento's configuration settings to point to the local database? (It's an XML file - I think /etc/config.xml or something). What port are you using? 3306?
kreut — 2011-03-29T07:50:35-04:00 — #3
Thanks for the quick reply!
I'm not actually using Magento; I wrote the code for everything in the site; but I AM using the Zend Framework (if that helps...). Also, I'm very much a newbie at this and am not sure what "port" I'm using...or even what exactly a port is...
Further thoughts would be appreciated...
prodigals — 2011-03-29T08:55:05-04:00 — #4
You have to edit the config file and give it the proper parameters like
database name, database username, database password, database servername etc...
If all went well, the error will be gone and site will be live or else you might have to ask your hosting support to
help correcting db error (in most of the cases they won't help but you can try your luck and you might be lucky)
kreut — 2011-03-29T13:30:02-04:00 — #5
Thanks so much! Hours of aggravation are gone.
prodigals — 2011-03-31T11:10:14-04:00 — #6
Glad to know, if this small piece of suggestion would have helped you