[PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Szeto

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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Ted Rolle

Mysql isn't up?


On Sun, 1 Apr 2001, Szeto wrote:

 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
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Szeto

the MySQL is on coz, it show in top


Ted Rolle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Mysql isn't up?


 On Sun, 1 Apr 2001, Szeto wrote:

  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
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Szeto

I am new to Linux environment
what is mean by socket and what is the file.extensive and location 


Felix Kronlage [EMAIL PROTECTED] wrote in message
20010401003741.A5849@mad">news:20010401003741.A5849@mad...
On Sun, Apr 01, 2001 at 06:05:28PM +0800, Szeto wrote:

 the MySQL is on coz, it show in top
   Warning: MySQL Connection Failed: Can't connect to local MySQL server
   through socket '/var/lib/mysql/mysql.sock' (111) in

is there a socket in /var/lib/mysql ?

-fkr
--
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet |


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Felix Kronlage

On Sun, Apr 01, 2001 at 06:50:24PM +0800, Szeto wrote:

 I am new to Linux environment

so what. You could still read the error-message:

| Warning: MySQL Connection Failed: Can't connect to local MySQL server
| through socket '/var/lib/mysql/mysql.sock' (111) in

this suggests, that you take a look at /var/lib/mysql to see if mysql.sock 
is there.

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Ted Rolle

Excellent diagnosis, sir!  However, it is woefully and pitifully short on
curative information.

On Sun, 1 Apr 2001, Felix Kronlage wrote:

 On Sun, Apr 01, 2001 at 06:50:24PM +0800, Szeto wrote:
 
  I am new to Linux environment
 
 so what. You could still read the error-message:
 
 | Warning: MySQL Connection Failed: Can't connect to local MySQL server
 | through socket '/var/lib/mysql/mysql.sock' (111) in
 
 this suggests, that you take a look at /var/lib/mysql to see if mysql.sock 
 is there.
 
 -fkr
 -- 
 gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
   |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
   |all your base are belong to us  |  shame on me  | fkr@IRCnet | 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Testing MySQL failed ???

2001-03-31 Thread Szeto

I have use other example and set the '/var/lib/mysql/mysql.sock'  to chmod
777

?php
   $link = mysql_connect ("localhost", "", "") or die ("Could not
connect");

  print ("Connected successfully");
   mysql_close ($link);
   ?


this example work
Thank you everybody.






Ted Rolle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Excellent diagnosis, sir!  However, it is woefully and pitifully short on
 curative information.

 On Sun, 1 Apr 2001, Felix Kronlage wrote:

  On Sun, Apr 01, 2001 at 06:50:24PM +0800, Szeto wrote:
 
   I am new to Linux environment
 
  so what. You could still read the error-message:
 
  | Warning: MySQL Connection Failed: Can't connect to local MySQL server
  | through socket '/var/lib/mysql/mysql.sock' (111) in
 
  this suggests, that you take a look at /var/lib/mysql to see if
mysql.sock
  is there.
 
  -fkr
  --
  gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0
|http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
|all your base are belong to us  |  shame on me  | fkr@IRCnet |
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]