[techtalk] mysql and php

Nicki Handy nicki at netcreations.com
Wed Dec 20 18:59:01 EST 2000


Ok- I did all of that. It was actually already set correctly in the 
safe_mysqld daemon - maybe I need to reboot or something since I've 
installed DBD/DBI but I mean, this isn't microsoft here - I wouldn't think 
I'd need to. I'll press on though- thanks for the help.

At 05:32 PM 12/20/00 -0500, Harald Welte wrote:
>On Wed, Dec 20, 2000 at 05:04:39PM -0500, Nicki Handy wrote:
> > Hi-
> > I'm running apache red hat linux 6.1, with mysql and php- I have a fine
> > time with *perl* and mysql talking to each other but this is the error I
> > get with my test php page-
> > Warning: MySQL Connection Failed: Can't connect to local MySQL server
> > through socket '/var/lib/mysql/mysql.sock' (111) in
> > /home/httpd/html/phpdbitest.php on line 5
> > Could not connect
> >
> > that file  mysql.sock is located in /tmp/mysql.sock not the directory it
> > lists in the warning- I don't want to make a link to a tmp directory and I
> > don't really know what this files is doing exactly. anyway, any 
> suggestions?
>
>The file is a unix domain socket, the socket over which a mysql client
>connects to a local server on the same machine.
>
>I've never heared about this problem, it seems like your mysql client
>libraries and the mysql server weren't built with the same configuration.
>
>linking the file wouldn't buy you anything, because the socket vanishes
>once your mysqld terminates.
>
>You can specify the path of the socket mysql uses via the environment
>variable MYSQL_UNIX_PORT=/foo/bar at daemon start time. You may want to
>set (and export!) this variable in your mysql - init script.
>
>If your init script is running safe_mysqld (which is a shell-script),
>you can make it call 'safe_mysqld --socket=/foo/bar'. safe_mysqld takes
>care of setting and exporting the apropriate environment variable.
>
> > Thanks,
> > Nicki
>
>--
>Live long and prosper
>- Harald Welte / laforge at gnumonks.org                http://www.gnumonks.org
>============================================================================
>GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
>V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)





More information about the Techtalk mailing list