#34188 [Bgs]: mysql_connect can connect via localhost but *not* via TCP/IP
| From: | ken dot senior at nrl dot navy dot mil | Date: | Thu, 18 Aug 2005 16:50:15 +0000 |
| Subject: | #34188 [Bgs]: mysql_connect can connect via localhost but *not* via TCP/IP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83777@lists.php.net to get a copy of this message | ||
ID: 34188
User updated by: ken dot senior at nrl dot navy dot mil
Reported By: ken dot senior at nrl dot navy dot mil
Status: Bogus
Bug Type: MySQL related
Operating System: Linux 2.6.11-1.1369_FC4
PHP Version: 5.0.4
New Comment:
Since the mysql clients can connect (i.e., outside of PHP) via both
sockets and via TCP/IP methods, how can it be anything but
PHP/php-mysql?
Previous Comments:
------------------------------------------------------------------------
[2005-08-18 18:47:54] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Give connect privileges to your user.
------------------------------------------------------------------------
[2005-08-18 18:40:28] ken dot senior at nrl dot navy dot mil
Description:
------------
Just installed FC4 OS, Apache, PHP, MySQL, and php-mysql (all via yum)
and discovered a strange bug when using PHP to connect to MySQL. The
only connection which will work is to a local instance of MySQL via a
socket, i.e., localhost setting. However, TCP/IP connections, both
local as well as to other remote MySQL servers, result in the PHP
error:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to
MySQL server on '192.168.0.4' (13) in /var/www/html/IGStime/index.php
on line 720
could't connect to MySQL server
Usually, the problem is just the opposite, that is being able to
connect via TCP/IP but not sockets. Does anyone have a clue about
this?
Ken Senior
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34188&edit=1