Skip to main content
Inspiring
January 12, 2009
Question

CF8 / MySQL 5 - Cannot connect to remote datasource

  • January 12, 2009
  • 5 replies
  • 1509 views
Hi all,

i'm using CF8 on my web server and i'm trying to connect to a remote MySQL datasource. Ive doubled checked my settings and ive even got my web developer to check the settings and they are all correct. My developer can connect to the database no problem, so i know it must be an issue with my CF server.

this is a complete blocker, we cant continue with the development until we fix this.

this is the error i get when i try to verify the db connection:

This topic has been closed for replies.

5 replies

Inspiring
January 13, 2009
zac1234 wrote:
> ok, so this is what i got:
>
> C:\Documents and Settings\Administrator.ALLIED-WEB-01>telnet 64.27.56.103 3306
> Connecting To xx.xx.xx.xx...Could not open connection to the host, on port 3306
> : Connect failed

This means you cannot open a connection to that host. This is not
related to ColdFusion. You need to check for a firewall or something
like that that restricts your outgoing connections on the ColdFusion box
or restricts the incoming connections on the MySQL box or a firewall
somewhere in between them.

--
Mack
zac1234Author
Inspiring
January 13, 2009
ok, so this is what i got:

C:\Documents and Settings\Administrator.ALLIED-WEB-01>telnet xx.xx.xx.xx 3306
Connecting To xx.xx.xx.xx...Could not open connection to the host, on port 3306
: Connect failed
Inspiring
January 13, 2009
zac1234 wrote:
> what's this telling us? did i type it right?

No, you didn't type right. It should be:
telnet 1.1.1.1 3306
(where 1.1.1.1 is the IP of your mysql host)

and
telnet host 3306
(where host is the host name, for example mysql.site.com)

--
Mack
zac1234Author
Inspiring
January 13, 2009
ok so if type at the command promt this:

telnet mysql_xx.xx.xx.xx 3306 i get this:


Connecting To mysql_xx.xx.xx.xx...Could not open connection to the host, on port 3306: Connect failed

if i type this:

telnet mysql_xx.xx.xx.xx 3306 telnet mysql_Xname.com 3306

i get this:

C:\Documents and Settings\Administrator.ALLIED-WEB-01>telnet mysql_xx.xx.xx.xx
3306 telnet mysql_Xname.com 3306

telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
-a Attempt automatic logon. Same as -l option except uses
the currently logged on user's name.
-e Escape character to enter telnet client prompt.
-f File name for client side logging
-l Specifies the user name to log in with on the remote system.
Requires that the remote system support the TELNET ENVIRON option.
-t Specifies terminal type.
Supported term types are vt100, vt52, ansi and vtnt only.
host Specifies the hostname or IP address of the remote computer
to connect to.
port Specifies a port number or service name.


what's this telling us? did i type it right?



Inspiring
January 13, 2009
zac1234 wrote:
> Hi all,
>
> i'm using CF8 on my web server and i'm trying to connect to a remote MySQL
> datasource. Ive doubled checked my settings and ive even got my web developer
> to check the settings and they are all correct. My developer can connect to the
> database no problem, so i know it must be an issue with my CF server.

"java.net.NoRouteToHostException MESSAGE: No route to host"

Verify that you can access the MySQL server from the CF server:
telnet mysql_server_ip 3306
telnet mysql_server_name 3306

--
Mack