0
votes

http://go.wlg.co.nz/login.php

I had a page working fine and I swear I didn't change anything. Now its returning this:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/93/10501493/html/go/connect.php on line 15

Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/content/93/10501493/html/go/connect.php on line 16

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/content/93/10501493/html/go/login.php on line 16

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/content/93/10501493/html/go/login.php on line 17

Warning: mysql_close() expects parameter 1 to be resource, boolean given in /home/content/93/10501493/html/go/connect.php on line 18

Anything obvious jumps out?

1
Try using the local ip address (127.0.0.1) instead of 'localhost' in mysql_connect(). - Manwal

1 Answers

0
votes

Make sure mysql service is running

service mysqld start

Or

Are you connecting to "localhost" or "127.0.0.1" ? when you connect to "localhost" the socket connector is used, but when you connect to "127.0.0.1" the TCP/IP connector is used. You could try using "127.0.0.1" if the socket connector is not enabled/working.