From: [EMAIL PROTECTED] 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: '[EMAIL PROTECTED]' 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=support 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