This is a server configuration issue of some sort. You can see others have run into it with a quick google search like here:
http://stackoverflow.com/questions/5376427/cant-connect-to-local-mysql-server-through-socket-var-mysql-mysql-sock-38
Are you sure the database server name is correct in your connection file? That could be the cause as well. Are you able to connect to the phpMyAdmin on that server?