-1

This is not supported on the shared hosting server, Any idea?

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2)
Zeeshan
  • 1,659
  • 13
  • 17
  • 3
    Too often we have code with no error messages. Now we have an error message with no code. –  Dec 14 '14 at 05:15
  • 1
    You should contact your hosting company for the MySQL connection details. They likely host it on a different server, not localhost. – Jeremiah Winsley Dec 14 '14 at 05:19

1 Answers1

0

I have checked further and i am using Mysql.Socket - this is not supported on the shared server. The connection should be Mysqli. When i have changed the mysql into mysqli now it is perfectly connecting.