#30084 [Opn->Bgs]: Unable to connect MySQL usng IP Addr
| From: | georg@php.net | Date: | Tue, 14 Sep 2004 10:35:57 +0000 |
| Subject: | #30084 [Opn->Bgs]: Unable to connect MySQL usng IP Addr | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66169@lists.php.net to get a copy of this message | ||
ID: 30084
Updated by: georg@php.net
Reported By: pawanwattamwar at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windows
PHP Version: 4.3.8
New Comment:
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.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2004-09-14 11:56:21] pawanwattamwar at gmail dot com
Description:
------------
When I use ($localhost="10.238.21.140:3306";)i.e. IP addr of my machine
insted of 127.0.0.1 or local host .It gives following error :
Warning: mysql_connect(): Can't connect to MySQL server on
'10.238.21.140' (10061) in c:\program files\easyphp1-7\www\new.php on
line 6
Unable to select database
Reproduce code:
---------------
<?
$user="root";
$password="";
$database="mysql";
$localhost="10.238.21.140:3306";
mysql_connect($localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="INSERT INTO contacts VALUES
('','Pawan','Wattamwar','02234
567890','00212 334455','01224
567891','johnsmith@gowansnet.com','http://www.gowansnet.com')";
mysql_query($query);
mysql_close();
?>
Expected result:
----------------
blank screen without any error and row inserted in DataBase.
Actual result:
--------------
Warning: mysql_connect(): Can't connect to MySQL server on
'10.238.21.140' (10061) in c:\program files\easyphp1-7\www\new.php on
line 6
Unable to select database
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30084&edit=1