Re: Mysql socket connect problems
| From: | Paul Newby | Date: | Tue, 20 Mar 2001 21:34:52 +0000 |
| Subject: | Re: Mysql socket connect problems | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-2529@lists.php.net to get a copy of this message | ||
I also have the problem described by Jason, or a somewhat similar
one. The MySQL command line monitor works fine, but when
php mysql functions are called from a script I get
Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock'
which is kind of odd because in the process of getting
PHP4 installed, I removed and reinstalled MySQL, and changed
the layout in the process: the mysql directory
was moved from /var/lib to /usr/local/mysql/var
and PHP4 was configured with '--with-mysql=/usr/local/mysql'
... so I don't know why php appears to be referring
to /var/lib/mysql at all.
Any ideas?
Thanks,
Paul N.
> Hi
>
> I would be really grateful if someone can help me out.
> I have installed Apache 1.3.17 with php4pl1 and Mysql 3.23.33. I can connect
> to Mysql through the console but when I try to connect to it on my web
> broswer then I get this error message:
>
> Warning: MySQL Connection Failed: Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (111) in
> /home/JasonC/Dev/registration.php on line 19
>
> I am using the mysql.sock file in the /tmp/ directory but I have also placed
> the mysql,sock file in the '/var/lib/mysql/ directory but to no avail!
>
> Please help
>
> Thankyou
>
> Jason