Re: mysql_connect problem under RedHat 8.0 ?
| From: | Jason Wong | Date: | Sun, 08 Dec 2002 16:53:39 +0000 |
| Subject: | Re: mysql_connect problem under RedHat 8.0 ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127438@lists.php.net to get a copy of this message | ||
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.
*/