Edit report at http://bugs.php.net/bug.php?id=52140&edit=1
ID: 52140 Updated by: johan...@php.net Reported by: cscholz at gsd-web dot de Summary: mysql_connect uses wrong IP-address for error-messages of further connections Status: Open Type: Bug Package: MySQL related Operating System: Ubuntu 10.4 PHP Version: 5.3.2 New Comment: The error message should contain the IP address of the host running PHP as it is used for authentication by MySQL. Is 192.168.0. The IP of the web server? Previous Comments: ------------------------------------------------------------------------ [2010-06-22 11:34:21] cscholz at gsd-web dot de Description: ------------ When doing more than one mysql_connect the error message will return the wrong ip-address in the reply if subsequent connections use a different IP. This bug is also true for mysqli_connect by the way. Test script: --------------- <? mysql_connect ( '192.168.0.1' , 'valid user' , 'valid password' ); mysql_connect ( '192.168.0.2' , 'invalid user' , 'or invalid password' ); ?> Expected result: ---------------- Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'invalid user'@'192.168.0.2' (using password: YES) in thecode.php on line 4 Actual result: -------------- Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'invalid user'@'192.168.0.1' (using password: YES) in thecode.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52140&edit=1