• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

MyODBC cannot connect to remote MySQL database

Hi there. I have a two servers connected to the net, and a MySQL server running on a LAN at my office. The LAN is protected by a firewall which has port 3306 forwarded to the MySQL machine.

One of the computers on the net can access the MySQL data, and one cannot even connect to it.

I try from my house and various other computers and they all work fine. Its just one server that cannot access it.

The one that doesn't work is a NT4 Server, but it used to be fine, and it used to "see" the data until one day the mysql server failed, and since it has been rebuilt it cannot access it.

Does anyone have any ideas of why this one machine cannot view it? It can ping the router that the mysql server is connected to, but nothing other than that.

Thanks, Chris
0
christatedavies
Asked:
christatedavies
  • 3
  • 3
1 Solution
 
SqueebeeCommented:
Can you provide some error information? Is MyODBC installed properly? What application are you trying to use to access the database? Did you reconfigure a proper DSN?

Regards,
Mike Hillyer
http://www.openwin.org/mike
0
 
christatedaviesAuthor Commented:
I am trying to use a system DSN which used to work fine. On the MyODBC DSN window there is a test button and this takes around 1 minute to come back with an error "Cannot connect to MY SQL server on xxx.xxx.xxx.xxx"

From other machines, the test is successful...
0
 
petoskey-001Commented:
Here are some things to try...

1. Make sure your two machines can send packets to each other.  

Go to the command prompt on your MyODBC machine.  Run "ping xxx.xxx.xxx.xxx" and make sure you can ping your MySql server.  If you can't try "tracert xxx.xxx.xxx.xxx" and see where the packets are getting lost.  


2. If your ping works OK, then you can send packets.  Try connecting to the specific port MySql uses.  

Again from the MyODBC machine type "telnet xxx.xxx.xxx.xxx 3306".  If you get "Could not open connection ..... Connect failed" then something is stopping the rejecting the connection between you and the server machine.

Most likely a firewall or something is not allowing you to connect, or possibly the MySql server is running on a non-standard port.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
christatedaviesAuthor Commented:
I cannot connect, but the server management says there is nothing blocking the port.

Is there any tracing tool I can use to see where its getting stopped?
0
 
petoskey-001Commented:
tracert will show you each hop between your computer and the server.  That is the "tracert xxx.xxx.xxx.xxx".  It would show something like this...

C:\>tracert www.whitehouse.gov

Tracing route to a1289.g.akamai.net [65.65.163.10]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.0.1
  2   127 ms   127 ms   127 ms  66.129.41.254
  3   128 ms   128 ms   128 ms  66.129.37.185
  4   140 ms   138 ms   144 ms  67.39.114.189
  5   140 ms   145 ms   141 ms  bb1-g1-0.klmzmi.ameritech.net [67.36.55.99]
  6   148 ms   143 ms   141 ms  bb1-p4-2.emhril.ameritech.net [151.164.190.177]

Now there are lots more hops between myself and the whitehouse, but you will sometimes get something like...

  7 131.234.32.34   reports: Destination net unreachable

or timeout or some other error.

Every router that passes your packet on to the next one is a hop, and one of those is what's stopping things.
0
 
christatedaviesAuthor Commented:
Passes that fine. It can see the server, just not the mysql installation on it.
0
 
petoskey-001Commented:
When you said it can't connect I thought you mean the ping, not the telnet.

You can't connect on that port, but can ping the machine.  So the packets get through, but the MySql machine rejects them.  This means that MySql isn't running on that port, or a firewall on the MySql machine is not letting them through.  The only things I can think of anyway.  I still can't think of why it would do that for only one machine.  

Try connecting to other services on the MySql machine.  Make sure you can communicate on some other port.  That's all I can think of right now.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now