Help: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '
I keep getting this error message each time i connect to mysql. I am hosting on a dedicated server.
Also i have other websites which connect to the same mysql remotely. the same error message is encounted each time any of these websites tries to connect to the website.
I really need some expertise on this issue as this is driving away a lot of traffic from my website. thanks.
I have checked the connection scripts and its correct, as i have up tested with other mysql's.
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/madeina2/public_html/connection.php on line 13
Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/madeina2/public_html/connection.php on line 14
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/madeina2/public_html/index.php on line 57
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/madeina2/public_html/index.php on line 57 ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)
i checked and the connection script is correct. below is the script i use for connecting to mysql
$hostname = "localhost";
$db_user = "trilionit";
$db_password = "123456";
$db_table = "madein_afrika";
$db = mysql_connect($hostname,$db_user,$db_password);
mysql_select_db($db_table,$db);
is there a problem that im not seeing?
Subject
Written By
Posted
Help: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '
June 08, 2010 12:30PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.