Testing MySQL failed ???
| From: | Szeto | Date: | Sun, 01 Apr 2001 09:51:21 +0000 |
| Subject: | Testing MySQL failed ??? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-8073@lists.php.net to get a copy of this message | ||
Hello
The code below i use in testing the connection (written in php4)
<?
if(!mysql_connect("localhost","khaimun","akyweb")) {
print "could not connect to mysql!";
}
mysql_select_db("focalmail");
?>
-------------------
Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in
/var/www/html/test/test-db.php4 on line 2
could not connect to mysql!
Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in
/var/www/html/test/test-db.php4 on line 5
Warning: MySQL: A link to the server could not be established in
/var/www/html/test/test-db.php4 on line 5
Note :
The above error i get in executing the code
--
--------------------------------------------------------------
Any suggestions would be appreciated.
Thank You
Khai Mun, Ng