Skip to main content
December 29, 2006
Answered

Coldfusion Administration:Adding Data Sources Error

  • December 29, 2006
  • 1 reply
  • 501 views
* Connection verification failed for data source: online_store
[]java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?

Thats the message I get when I try to add a mysql database using the coldfusion admin page. I never get this error when I add an access database.

Where could I be going wrong?

Could anyone help or suggest something?
    This topic has been closed for replies.
    Correct answer BKBK
    > where it states to enter jdbc url, i entered in the following:
    > jdbc:mysql://[localhost]:[3306]/[online_store]

    Leave out the square brackets.

    > do we extract the jar file itself which opens up 3 folders and
    > paste to destination folder?

    No

    > do we extract the main zip file to a folder of same name and
    > copy and paste the jar file to destination folder

    Yes. But, before that, stop Coldfusion and delete any JAR file of type mysql-connector-java-*** currently in the directory cf_root/WEB-INF/lib directory. Otherwise you'll be installing two drivers.

    > for driver class: com.mysql.jdbc.5.0.4
    No. I think that should be: com.mysql.jdbc.Driver. Here's more advice on how to configure MySQL5.x. The same themes occurred in this recent thread on CFMX and MySQL5.






    1 reply

    Inspiring
    December 30, 2006
    1) is you mysql server actually running? localhost:3306 is the standadr port for mysql. if you have changed the port number during mysql installation then you should change it in the dsn string in cf as well. most likely your mysql server is either not running or not configured properly.
    2) which mysql driver are you using? if you are trying to set up a dsn with the standard mysql 3.x driver shipped with CF, then you may have a problem. go to mysql.org and download the latest mysql connector/j + look up instructions on how to install it and how to configure your dsn. i bet you will not have this error with the updated driver if mysql is running and is configured properly.
    December 30, 2006
    The mysql server is running since I am able to connect to the mysql databases using mysql tools like navicat.
    I came across a link last night which has instructions on connecting the coldfusion mx administration to the mysql database using certain jdbc drivers.

    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6ef0253

    I went through the steps but it is still not working as I have probably missed something out. A few things are unclear even though it has provided step by step instructions.

    Regd the drivers and connectors, I had downloaded MySQL Connector/J 5.0

    where it states to enter jdbc url, i entered in the following:
    jdbc:mysql://[localhost]:[3306]/[online_store]

    for driver class: com.mysql.jdbc.5.0.4

    I am confused with steps 2 and 3.

    2. Extract the mysql-connector-java-3.{n}-bin.jar file from the downloaded archive file.
    3. Save the mysql-connector-java-3.{n}-bin.jar file in thecf_root/WEB-INF/lib directory.

    What i am confused about is do we extract the main zip file to a folder of same name and copy and paste the jar file to destination folder or do we extract the jar file itself which opens up 3 folders and paste to destination folder?

    below is the error i get.

    Connection verification failed for data source: online_store
    []java.sql.SQLException: No suitable driver available for online_store, please check the driver setting in resources file, error: com.mysql.jdbc.5.0.4
    The root cause was that: java.sql.SQLException: No suitable driver available for online_store, please check the driver setting in resources file, error: com.mysql.jdbc.5.0.4

    where could i be going wrong?
    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    December 30, 2006
    > where it states to enter jdbc url, i entered in the following:
    > jdbc:mysql://[localhost]:[3306]/[online_store]

    Leave out the square brackets.

    > do we extract the jar file itself which opens up 3 folders and
    > paste to destination folder?

    No

    > do we extract the main zip file to a folder of same name and
    > copy and paste the jar file to destination folder

    Yes. But, before that, stop Coldfusion and delete any JAR file of type mysql-connector-java-*** currently in the directory cf_root/WEB-INF/lib directory. Otherwise you'll be installing two drivers.

    > for driver class: com.mysql.jdbc.5.0.4
    No. I think that should be: com.mysql.jdbc.Driver. Here's more advice on how to configure MySQL5.x. The same themes occurred in this recent thread on CFMX and MySQL5.