Dear Jackson,

> What does this error mean? I am trying to authenticate from a php
script using the following code...
> $db=mysql_pconnect("localhost","username","password");
> The user "username" is able to login to mysql ata command prompt.

Not really. At the command prompt you are supposedly logged in as system
root. The PHP script (to be correct: the parser / interpreter) runs as
user "wwwrun" by default, who does not have the same (Unix system)
rights as root.

Make sure the MySQL server (daemon) runs as user "mysql" (mysqld -u
mysql), and that the rights for the datadir (where the socket sits by
default) have been set to 700 (7 for user "mysql").

Regards,

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

----- Original Message -----
From: "cjackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 10:29 PM
Subject: can't connect through socket using PHP script


> Warning:  Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (111)
>
> What does this error mean? I am trying to authenticate from a php
script using the following code...
>
> $db=mysql_pconnect("localhost","username","password");
>
> The user "username" is able to login to mysql ata command prompt.
>
> Thanks,
> Jackson
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to