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

From: Date: Wed, 24 Apr 2002 08:53:23 +0000
Subject: 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-83240@lists.php.net to get a copy of this message
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 have 4.1.2 running on a different server, and even just specifying "localhost" for the database host, automatically connects via UNIX socket. "Derick Rethans" <d.rethans@jdimedia.nl> wrote in message news:Pine.LNX.4.44.0204240828120.25959-100000@jdi.jdimedia.nl... > Hey Zak, > > I think this is a nice thing for 4.2.1. I can reproduce it. I hope > somebody can investigate this before friday (RC1 of 4.2.1 is scheduled > then). > > Derick > > ---------- Forwarded message ---------- > Date: 23 Apr 2002 19:50:29 -0000 > From: jr-php@quo.to > To: php-bugs@lists.php.net > Subject: Bug #16768: mysql_connect("localhost", > ...) doesn't connect to localhost! > > From: jr-php@quo.to > Operating system: Red Hat Linux 7.2 > PHP version: 4.2.0 > PHP Bug Type: MySQL related > Bug description: mysql_connect("localhost", ...) doesn't connect to localhost! > > After upgrading from PHP 4.1.2 to PHP 4.2.0, MySQL connections fail with > this error: > > Warning: Access denied for user: 'username@my.fully.qualified.name' > > Apparently, it is trying to connect to 'my.fully.qualified.name' instead > of 'localhost' as before. This seems wrong because my mysql_connect() call > uses 'localhost' as the host name: > > mysql_connect("localhost", "username", "password"); > > I can work around this by changing all my MySQL grants from > 'username'@'localhost' to > 'username'@'my.fully.qualified.name', but that > seems unnecessary; this should be fixed in PHP. > > BTW, I've used the same above mysql_connect() call since the PHP 3.x days > and it's always worked fine, until now. > > > My PHP configure line: > ./configure --with-apache=../apache_1.3.24 --enable-track-vars \ > --with-mysql --with-zlib --with-gd > > All PHP configuration settings are defaults. (i.e. php.ini = > php.ini-dist) > > Apache version is 1.3.24. MySQL version is 3.23.49a. > -- > Edit bug report at http://bugs.php.net/?id=16768&edit=1 > -- > Fixed in CVS: > http://bugs.php.net/fix.php?id=16768&r=fixedcvs > Fixed in release: > http://bugs.php.net/fix.php?id=16768&r=alreadyfixed > Need backtrace: > http://bugs.php.net/fix.php?id=16768&r=needtrace > Try newer version: > http://bugs.php.net/fix.php?id=16768&r=oldversion > Not developer issue: http://bugs.php.net/fix.php?id=16768&r=supportzå -0î > ÿ¿=OÇ_h ½ > Expected behavior: > http://bugs.php.net/fix.php?id=16768&r=notwrong > Not enough info: > http://bugs.php.net/fix.php?id=16768&r=notenoughinfo > Submitted twice: > http://bugs.php.net/fix.php?id=16768&r=submittedtwice >

« previous php.dev (#83240) next »