Can't connect to local MySQL server through socket.. ?
| From: | afan@afan.net | Date: | Thu, 09 Jun 2005 18:07:26 +0000 |
| Subject: | Can't connect to local MySQL server through socket.. ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-216748@lists.php.net to get a copy of this message | ||
I have an admin area for one page on shared hosting. And I wanted to protect it by shared SSL from my hosting company. I got from them
Your domain, afan.net, can now access our shared SSL certificate.
To securely access the documents folder, go to ...
https://secure.inetwave.com/afan/filename
But, when I go to my admin area
https://secure.inetwave.com/afan/admin
I'm getting Warning:
*Warning*: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in */web/home/afan/admin/includes/functions.php* on line *120*
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
line 120 in file functions.php is
117 # DATABASE CONNECTING 118 function db_connect($host, $user, $password, $db_name)119 {
120 mysql_connect($host, $user, $password) or die (mysql_error()); 121 mysql_select_db($db_name) or die (mysql_error());122 } ???? -afan