Re: MYSQL support

From: Date: Sat, 22 Sep 2001 21:46:14 +0000
Subject: Re: MYSQL support
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-4378@lists.php.net to get a copy of this message
Ashley M. Kirchner (ashley@pcraft.com): > Rasmus Lerdorf wrote: >> PHP hasn't hardwired anything. The MySQL library which ships with PHP >> does have this hardwired, but that is why I told your to use >> --with-mysql=/path which tells PHP to not use the built-in library and to >> use the system one which has the correct socket location built in. > I did. --with-mysql=/usr/local still says the socket is in /tmp/mysql.sock > when it's not. It's in /usr/local/var/mysql/mysql.sock. mySQL is running fine, > and the socket is _not_ in /tmp/mysql.sock. So why does PHP insist on it being > there? I've always had this "problem" with PHP/MySQL installs. And always used the --with-mysql setting to point to the only library installed on the system (which therefore matches the mysqld installed on the system). mysqld allows you to specify the location of the socket file in the command-line when you call it. So, you could change your mysql startup script to tell it to put the socket file in /tmp/mysql.sock. I find it much easier, however, to symlink it as Stefan suggested. The only problem I have with this is that some systems have a 'cleanup' routine that empties /tmp on startup/shutdown (since /tmp is supposed to be temporary) and thus deletes the symlink. It would be better if PHP configure could be told where to find the mysql.sock file, although I admit adding *more* options to PHP configure is not something I think anyone really wants to do. :-) -- Jeremy Wadsack Wadsack-Allen Digital Group

« previous php.install (#4378) next »