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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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?

Mike Hillyer
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"

From other machines, the test is successful...
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" and make sure you can ping your MySql server.  If you can't try "tracert" 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 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.
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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?
tracert will show you each hop between your computer and the server.  That is the "tracert".  It would show something like this...


Tracing route to []
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms
  2   127 ms   127 ms   127 ms
  3   128 ms   128 ms   128 ms
  4   140 ms   138 ms   144 ms
  5   140 ms   145 ms   141 ms []
  6   148 ms   143 ms   141 ms []

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

  7   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.
christatedaviesAuthor Commented:
Passes that fine. It can see the server, just not the mysql installation on it.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.