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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 18:01:34 2024 UTC