From:             bc at default dot co dot yu
Operating system: Linux 2.4
PHP version:      4.3.10
PHP Bug Type:     MySQL related
Bug description:  bloated localhost connection

Description:
------------
I'm using recent 4.3.10 release with mysql 4.1 client libs.

I have a configuration of 2 servers. One is the MySQL database, another is
apache 1.3 running PHP 4.3.10 through CGI/FastCGI interface.

All scripts are using "localhost" value in mysql_connect() function.
Actually that connection is being NAT'ed with iptables to MySQL server.

When I do manual connect with telnet to localhost:3306 it works fine. Also
if "localhost" is changed  to "127.0.0.1" or  direct IP of MySQL host (
10.1.5.55 in this case ) it just works fine!
*But* when is "localhost" in mysql_connect() it simply does NOT work!

Reproduce code:
---------------
I keep getting this: 
Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)


keep in mind that I *am* providing the password:
$db = mysql_connect("localhost", "$db_username", $db_password);

this is my /etc/hosts file:
127.0.0.1       localhost localhost.localdomain

BTW, I've tried all the combinations:
127.0.0.1       localhost
or:
127.0.0.1       localhost.localdomain


-- 
Edit bug report at http://bugs.php.net/?id=31220&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31220&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31220&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31220&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31220&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31220&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31220&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31220&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31220&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31220&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31220&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31220&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31220&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31220&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31220&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31220&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31220&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31220&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31220&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31220&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31220&r=mysqlcfg

Reply via email to