Bug #16741 Updated: mysql_connect maps localhost to localhost.localdomain
| From: | fmouse at fmp dot com | Date: | Tue, 23 Apr 2002 06:01:50 +0000 |
| Subject: | Bug #16741 Updated: mysql_connect maps localhost to localhost.localdomain | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5634@lists.php.net to get a copy of this message | ||
ID: 16741
Updated by: fmouse@fmp.com
Reported By: koonyin@siukoon.com
Status: Open
Bug Type: MySQL related
Operating System: Redhat 7.2
PHP Version: 4.2.0
New Comment:
Same thing happens on Debian testing. Same php.ini, same web server,
same script. "Can't connect to MySQL server on 'localhost' (111) in
/var/www/index.php" etc. etc. No problem with 4.1.2.
Previous Comments:
------------------------------------------------------------------------
[2002-04-23 00:57:38] koonyin@siukoon.com
It happens in 4.2.0, not 4.1.2.
mysql_connect("localhost", "username", "password") maps the host from
"localhost" to "localhost.localdomain".
It results "Warning: Host 'localhost.localdomain' is not allowed to
connect to this MySQL server in /blah/blah/blah/db_connect.php on line
N".
Current resolution: Grant localhost.localdomain in MySQL.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16741&edit=1