Skip to main content
Participant
April 28, 2008
Answered

MySQL Connection Problem

  • April 28, 2008
  • 1 reply
  • 548 views
Operating System: Linux Red Hat v5 (kernal.os release 2.6.18-8.e15)
Cold Fusion: Trial Developer Version 8
MySQL version: 5.0.51a
MySQL connector (installed in /opt/jrun4/lib): mysql-connector-java-5.1.6-bin.jar
Hostname (verified by sysctl and phpMyAdmin): //juniperweb/jsihome.com
MySQL Listening port (verified by phpMyAdmin): 3306

Apache web server: works
php: works
MySQL: works with php
Cold Fusion: works (CFIDE/administrator/index.cfm works)

Data Source settings tried:
Type: MySQL (4/5)
CF Data Source Name: junipersys
Database: junipersys
Server: //juniperweb/jsihome.com
Port: 3306
Username: website
Password: *******

and:

Type: Other
CF Data Source Name: junipersys-other
JDBC URL: jdbc:mysql://juniperweb/jsihome.com:3306/junipersys
Driver Class: com.mysql.jdbc.Driver
Username: website
Password: *******

Both settings throw the following error:

Connection verification failed for data source: junipersys-other
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException MESSAGE: Connection refused
STACKTRACE:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:209)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739)
at com.mysql.jdbc.Connection.(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:589)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:619)
** END NESTED EXCEPTION **
Last packet sent to the server was 0 ms ago.
The root cause was that: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException MESSAGE: Connection refused
STACKTRACE:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:209)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739)
at com.mysql.jdbc.Connection.(Connection.java:1553)
at com.mysql.jdbc.NonReg...

Any help greatly appreciated.

Dan Parchman
IT Technician
Email: dan@junipersys.com
Phone: 435.774.8992
Web: www.junipersys.com

Juniper Systems, Inc.
1132 West 1700 North
Logan, UT 84321
Telephone: 435-753-1881
FAX: 435-774-8990 or 435-753-1896


This topic has been closed for replies.
Correct answer JuniperDan
Solution found:

skip-network was set in the my.conf file, so MySQL was rejecting all connection requests from CF.

1 reply

Inspiring
April 29, 2008
JuniperDan wrote:
> Operating System: Linux Red Hat v5 (kernal.os release 2.6.18-8.e15)
> Cold Fusion: Trial Developer Version 8
> MySQL version: 5.0.51a
> MySQL connector (installed in /opt/jrun4/lib):
> mysql-connector-java-5.1.6-bin.jar
> Hostname (verified by sysctl and phpMyAdmin): //juniperweb/jsihome.com

That is not a valid hostname. "juniperwb" could be the hostname or
"jsihome.com", but not that. Make sure you have a valid hostname
according to the rules of DNS or just use an IP address.

Jochem


--
Jochem van Dieten
Adobe Community Expert for ColdFusion
JuniperDanAuthorCorrect answer
Participant
April 29, 2008
Solution found:

skip-network was set in the my.conf file, so MySQL was rejecting all connection requests from CF.