php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30084 Unable to connect MySQL usng IP Addr
Submitted: 2004-09-14 11:56 UTC Modified: 2004-09-14 12:35 UTC
From: pawanwattamwar at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.8 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pawanwattamwar at gmail dot com
New email:
PHP Version: OS:

 

 [2004-09-14 11:56 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-14 12:35 UTC] georg@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. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 16:01:33 2025 UTC