This is a very common problem.  It is documented in the manual and also in
other places as Edna has already mentioned.  Your php code has nothing to do
with the cause of the problem.

Basics:

1. Your server isn't running
2. Your paths to the socket file are incorrect. (Check php and mysql
settings)
3. Permissions are incorrect.

----- Original Message -----
From: "Syed Sumair" <[EMAIL PROTECTED]>
To: "Edna Walton" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 1:51
Subject: Re: I am facing this error [ Urgent ]


>
> Thanks for your replies
> but my problem is still there
> this is the php code iam using for connecting to Database:
>
>  $ss_conn  = mysql_connect($db_host,$db_usr,$db_pwd);
>
> and hosting infos are:
> Red hat linux
> mysql-3.23
> php 4
>
>
> >  From the error message, I'd guess you are using RedHat distribution.
If
> > not, ignore this.
> >
> > You must make sure that the directory /var/lib/mysql is owned by mysql
and
> > not root, so that mysql can write to it.
> >
> > Also see all the added comments in the relevant subsections of the
online
> > manual (link is added to all posts at the end).  They are constantly
being
> > added to.
> >
> > Hope this helps.
> >
> > Edna
> >
> > At 19:12 11/07/01 -0700, you wrote:
> > >What to do do
> > >I am facing this error !!
> > >
> > >Warning:  Can't connect to local MySQL server through socket
> > >'/tmp/mysql.sock' (2) in
> > >/web/sites/188/pisps/www.pisps.f2s.com/signup/index.php on line 372
> > >
> > >Warning:  MySQL Connection Failed: Can't connect to local MySQL server
> > >through socket '/tmp/mysql.sock' (2)
> > >
> > >
> > >---------------------------------------------------------------------
> > >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


---------------------------------------------------------------------
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