Skip to main content
Inspiring
March 16, 2011
Question

What's wrong with this MySQL connection? "Could not create connection to database server"

  • March 16, 2011
  • 2 replies
  • 5824 views

I'm able to connect to other MySQL databases but this one particular remote MySQL connection isn't working and I cannot figure it out.  It probably has something to do with the remote server, not CF, but I thought I'd post it here if anyone had an idea.  The MySQL account has full priviledges.

Here is the message when I try to validate the data source:

Connection verification failed for data source: test
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:  Could not create connection to database server. Attempted reconnect 3  times. Giving up.
The root cause was that:  com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:  Could not create connection to database server. Attempted reconnect 3  times. Giving up.

This topic has been closed for replies.

2 replies

Inspiring
March 22, 2011

This happened on two servers.  One one, the cause was that skip-networking was turned on.  In the other situation, it appears that the database name was case sensitive, so TEST was not the same as test.  Even though I edited the data source in the CF administrator, it still didn't work (very misleading).  When a coworker entered a new data source with the same information (uppercase database name this time from the start), it worked.

Has anyone else seen this problem with the case sensitive database names?  And with the data source in CF not updating the case correctly?  Seems like a bug in CF.

Owainnorth
Inspiring
March 16, 2011

Well, can you connect to the database through other means? Can you ping it? Telnet to it? Connect using MySQL tools?

Inspiring
March 16, 2011

Yes, a remote command line connection to that MySQL database works.

Participating Frequently
March 17, 2011

From the CF server ? It could be a firewall somewhere between CF and MySQL.

--

Mack