Re: Re: Bug #16768: mysql_connect("localhost", ...) doesn't connect to localhost! (fwd)

From: Date: Wed, 24 Apr 2002 10:12:11 +0000
Subject: Re: Re: Bug #16768: mysql_connect("localhost", ...) doesn't connect to localhost! (fwd)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-83249@lists.php.net to get a copy of this message
On Wed, 24 Apr 2002, Daniel Swarbrick wrote: > Just upgraded the 4.1.2 install, which has mysql socket in /tmp. > Unfortunately, this server now also refuses to connect via UNIX socket, > insisting on using TCP. > > HUH? phpinfo() reports MYSQL_SOCKET to be /tmp/mysql.sock, which in this > case is correct! > > Even with mysql_connect("localhost:/tmp/mysql.sock", $user, $pass), it still > uses TCP. Yeah... this is the main problem. It refuses to connect with the unix socket for some reason... but not always :I Derick > > <derick@php.net> wrote in message > > news:Pine.LNX.4.44.0204241139330.28288-100000@jdi.jdimedia.nl... > > Hello, > > > > thanks! Do you know if MySQL was started during ./configure ? > > > > Derick > > > > On Wed, 24 Apr 2002, Daniel Swarbrick wrote: > > > > > I'm configuring with > > > > 'configure --with-apxs=/usr/sbin/apxs --with-pgsql --with-mysql --with-pdfli > > > > b --with-zlib --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-ttf > > > --with-imap --with-gettext --enable-cli' > > > > > > The MySQL stuff from my config.log says > > > configure:39658: checking for MySQL support > > > configure:39698: result: yes > > > configure:39922: checking for MySQL UNIX socket > > > configure:39941: result: /tmp/mysql.sock > > > > > > However this is incorrect - the socket is in fact > > > /var/run/mysql/mysql.sock - as per default Slackware 8.0 install. I am > also > > > specifying this manually in my php.ini > > > > > > "Edin Kadribasic" <edink@proventum.net> wrote in message > > > > > > news:068b01c1eb70$553cd880$3600000a@intra.proventum.net... > > > > >I don't know whether this is related or not, but I've also found > > > > >that > > > since > > > > >upgrading to PHP 4.2.0 it is impossible to get mysql_connect() to > connect > > > > >via a UNIX socket. No matter whether I specify a socket manually or > not, > > > it > > > > >always connects via TCP. > > > > > > > > I cannot reproduce this. Could you please give us some more info on > your > > > > installation. Also please search for "checking for MySQL UNIX socket" > in > > > > your config.log and tell us the result. > > > > > > > > Edin > > > > > > > > > > > > > > > > -- > > > PHP Development Mailing List > > > <http://www.php.net/> > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > ----------------------------------------------------------------------- > > Did I help you? Consider a gift: > > > > http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B > > ----------------------------------------------------------------------- > > PHP: Scripting the Web - derick@php.net > > All your branches are belong to me! > > SRM: Script Running Machine - www.vl-srm.net > > ----------------------------------------------------------------------- > > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > ----------------------------------------------------------------------- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B ----------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net -----------------------------------------------------------------------

« previous php.dev (#83249) next »