Re: mysql_connect problem under RedHat 8.0 ?
| From: | Brian J. Celenza | Date: | Sun, 08 Dec 2002 17:02:20 +0000 |
| Subject: | Re: mysql_connect problem under RedHat 8.0 ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127439@lists.php.net to get a copy of this message | ||
I'm almost positive that the socket file is in the correct spot.
My installation was with Redhat 8.0, I also have mysqlcc installed, and it
uses /var/lib/mysql/mysql.sock successfully.
----- Original Message -----
From: "Jason Wong" <php-general@gremlins.biz>
Newsgroups: php.general
To: <php-general@lists.php.net>
Sent: Sunday, December 08, 2002 11:53 AM
Subject: Re: [PHP] mysql_connect problem under RedHat 8.0 ?
> On Monday 09 December 2002 00:29, Brian J. Celenza wrote:
> > Hello!
> >
> > When trying to connect to a mysql database under my linux system, I get
the
> > following error:
>
> How did you install your apache, mysql & php? Source/RPM? If RPM, where
did
> you get the RPMs? IIRC Redhat's packaging of MySQL differs from that
provided
> by www.mysql.com and this difference could potentially cause the problem
> you're seeing ...
>
> > Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (2) in /webroot/dbconnect.php on line 2
> >
> > Here is a copy of the code I am using:
> >
> > <?
> >
> > $link = mysql_connect("localhos" , "username" ,
> > "password")
> > or die("Couldn't Connect.");
> > ?>
>
> ... assuming that the above really is a typo and you _are_ using
'localhost'
> and not 'localhos'.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Your business will assume vast proportions.
> */
>