I am stuck on database setup


#1

I got this thing to the database setup. When i put my login details and database name i recieve this error:

Error while trying to connect to the database server:
SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

What should this mean? I wish i could find a service where i just copy and paste the damn code in my site.

I am on a freehostia.com by the way.


(vipsoft) #2

Use “127.0.0.1” instead of “localhost”. This is a compat buster introduced by php 5.3.x.


#3

Now it gives me this error:

Error while trying to connect to the database server:
SQLSTATE[HY000] [2013] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111


(vipsoft) #4

You’ll have to consult the freehostia sysadmins/tech support as it appears from their web site that they use a web server cluster, so there’s probably a special hostname for the mysql server.