NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Can't connect to MySQL from within the IDE


Joined: 02 Jan 2004
Posts: 6
Reply with quote
I am having trouble connecting to MySQL from within the PhpED IDE. I get an error 10060, very close to the error 10061 that is mentioned in the general forum. I expect the problem is the same, but I don't see a solution.

This same script works fine when executed from a browser in the same machine.

When I try to connect from within the debugger, and then I check the NETSTAT, I get php.exe:

LOCAL ADDRESS = port 3638
FOREIGN ADDRESS = port 3306

with a status of: SYN_SENT. This seems to be wrong, should they not both be on the same address (3306)?

My remote SQL database is definitely setup on port 3306.

The connection instruction "mysql_connect" still times out with this message:

"Error: E_WARNING
mysql_connect(): Can't connect to MySQL server on mywebsite (10060) at filename.php line 11"

I can not connect to the database from within the IDE using the database client feature, but I can connect to the server hosting the database via ftp feature from within the IDE (I established an FTP profile, and selected OPEN WORKSPACE and it automatically opened a connection to the remote ftp server and listed its directory - which is very cool). So the network connectivity is good, and the remote server is functioning (remember the script works from a browser on development machine).

So its clearly a MySQL connection problem, probably a port problem.

The last thing I tried was to locate the php.ini file and set mysql.default_port = 3306. I actually found two such files, one was php.ini, the other php.ini-dist, I set them both.
I then quit out of the IDE and restarted it to no avail, the results are the same results.

I think there are some instances when mysql.default_port does not have control over the port used. My guess is that Windows has control over this port, and it needs to be modified in some way that I am not familiar with.

Any input appreciated.

Thanks-
Charles
View user's profileFind all posts by charlesonthegoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
This seems to be wrong, should they not both be on the same address (3306)?

there is nothing wrong, actually. Only remote port makes sense for the outbound connections (originated from the client).

I'd recommend you run netstat on the server side and make sure a) it is bound to (listens on) 0.0.0.0 address, not 127.0.0.1. Otherwise only local clients may reach it. b) check if firewall rules allow you connect to the server.
Anyway, mysql and related problems would be raised in mysql forums.
You may want to read this doc I found for you http://dev.mysql.com/doc/mysql/en/can-not-connect-to-server.html

BTW, "within the ide" is wrong statement in the topic Smile You mentioned you're calling mysql_connect() So it means you are trying to connect using PHP, not the IDE Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Can't connect to MySQL from within the IDE
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic