#34188 [Opn->Bgs]: mysql_connect can connect via localhost but *not* via TCP/IP
| From: | rasmus@php.net | Date: | Sun, 21 Aug 2005 16:02:56 +0000 |
| Subject: | #34188 [Opn->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-83852@lists.php.net to get a copy of this message | ||
ID: 34188
Updated by: rasmus@php.net
Reported By: ken dot senior at nrl dot navy dot mil
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Linux 2.6.11-1.1369_FC4
PHP Version: 5.0.4
New Comment:
This is still not a support forum. Millions of sites out there are
connecting PHP to MySQL. You have some problem unique to your server
which you need to work through. If you do eventually discover an
actual bug in PHP related to this and you can provide some sort of
information other than, "it doesn't work, fix it!" then let us know.
From what you have given us we couldn't possibly help you solve this
without a dozen back and forth questions trying to narrow down the
cause. That's simply not what the bug database is for, sorry. Try one
of the mailing lists at http://www.php.net/mailing-lists.php
Previous Comments:
------------------------------------------------------------------------
[2005-08-21 17:54:37] ken dot senior at nrl dot navy dot mil
NOTE: All client scripts work outside PHP so this must be a problem
with PHP/php-mysql.
------------------------------------------------------------------------
[2005-08-18 18:50:14] ken dot senior at nrl dot navy dot mil
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?
------------------------------------------------------------------------
[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