Re: Can't connect to local MySQL server through socket.. ?
| From: | afan@afan.net | Date: | Thu, 09 Jun 2005 18:18:46 +0000 |
| Subject: | Re: Can't connect to local MySQL server through socket.. ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216750@lists.php.net to get a copy of this message | ||
According to Google, my MySQL db is not on secure.inetwave.com server and have to use "something else" instead of "localhost" for host in mysql_connect(), right?
-afan
afan@afan.net wrote:
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 is117 # 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