NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Cannot connect to my remote mysql database


Joined: 31 Jan 2008
Posts: 2
Reply with quote
I am unable to run my script from PhpED which interacts with my mysql database nor can I do debugging because PhpED seems not to be able to connect to the database. I get the message - "2003 - Can't connect to MYSQL server on '<name of host>' (10060).
View user's profileFind all posts by kwbandySend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
This is most likely not a phped problem but rather some external factor like a firewall or something else.
To quickly test that, try to telnet to port 3306 on the server running the database, you should get at least a short connection.
If that too reports it can't connect, it really is something else then php.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
yes right, 10060 sounds like there is a firewall blocking phped. But checking with telnet may not help if firewall does not block telnet. I'd recommend just to check firewall settings.
Also if you run mysql on a remote host, you can't connect to it until you create appropriate account, make sure it listens on the external ip (not only on the localhost) and server firewall allows external (remote) hosts to connect to it too. For the public servers it all may create security problems and is not a recommended way. In this case, I'd recommend to use ssh tunnels.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 31 Jan 2008
Posts: 2
Reply with quote
Thank you for your help. I tried the telnet connection and it failed. I suspected from the beginning that it was a server side issue, but thought maybe PhED had a work around. I have no control over the server side - at least that I know of. I use the Bravehost hosting service and the php and mysql service provided in their hosting package. I know nothing about the server side setup or how to work with it. I guess I can check with Bravehost to see if they have any solutions.

Thanks again.
View user's profileFind all posts by kwbandySend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
If it is a public host they either don't offer external MySQL connectivity at all (most likely) or it will be on a custom port. So the best idea is indeed mail them and ask Smile
View user's profileFind all posts by BlizzSend private messageVisit poster's website
[resolved] Cannot connect to my remote mysql database
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