Skip to main content
tjguida
Participant
October 25, 2015
Answered

Coldfusion 11 java.sql.SQLException (Missing MySQL 5 driver)

  • October 25, 2015
  • 3 replies
  • 4856 views

I just installed Coldfusion 11 on a new Windows 7 build. Additionally installed the latest version of WAMP (to develop my databases).

I created a datasource, and used MySQL5 for my driver.  When i try to connect my database (created in WAMP) i get the following error:

Connection verification failed for data source: myTestdb java.sql.SQLException: No suitable driver available for myTestdb, please check the driver setting in resources file, error: com.mysql.jdbc.Driver The root cause was that: java.sql.SQLException: No suitable driver available for myTestdb, please check the driver setting in resources file, error: com.mysql.jdbc.Driver.  Any suggestions?

I searched the web, and all the solutions are extremely confusing.  Does anyone have a straight forward solution?

    This topic has been closed for replies.
    Correct answer haxtbh

    What part are you finding confusing?

    You should simply have to download the  driver - MySQL :: Download Connector/J

    Extract the jar file. Then put this jar in the CF11 install lib directory. Which on windows is C:\Coldfusion11\cfusion\lib by default.

    Restart CF11 and then check its loaded up by looking at the system settings option in the CF administrator or by adding a db connection.

    3 replies

    Wafer
    Participant
    March 28, 2020

    My computer is Mac, I am trying to connect to my database on MySQL5 through Coldfusion11. I received a similar warning message as below: 

    Connection verification failed for data source: mydb_mysql
    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
    The root cause was that: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

    I have downloaded the JDBC driver through MySQL :: Download Connector/J. It helped me to be able to create the data source, but when I tried to connect to my database through filling "Database", "Server", "Port", "Username", and "Password". I got the message as above all the time. 

     

    To masters of problem-solver Charlie_Arehart and haxtbh‌, I appreciate it if you could help me go through this! 

     

    All the best

     

    Charlie Arehart
    Community Expert
    Community Expert
    March 28, 2020

    Wafer, first thanks for the kind regards. As for the error, it's not really a CF one, but a mysql error, about mysql configuration.

     

    Had you simply Googled the message? The first result seems to have all you need:

     

    https://stackoverflow.com/questions/41645309/mysql-error-access-denied-for-user-rootlocalhost

     

    If somehow you tried tried those options, let us know more details. 

    /Charlie (troubleshooter, carehart. org)
    Wafer
    Participant
    March 28, 2020

    Hello Charlie,

     

    I didn't find this solution before, thanks for the information. I will definitely give it a try and keep you posted.

    Thank you again for the prompt reply!

     

    Wafer

    WolfShade
    Legend
    October 26, 2015

    For some reason, Adobe left MySQL drivers OUT of CF11 install.  As haxtbh‌ pointed out, it's a simple download, extract, place, and service restart.

    I went through the same confusion when I was setting up my virtual dev network at home.  It was complicated enough to put it on Ubuntu; then this. 

    V/r,

    ^_^

    haxtbhCorrect answer
    Inspiring
    October 26, 2015

    What part are you finding confusing?

    You should simply have to download the  driver - MySQL :: Download Connector/J

    Extract the jar file. Then put this jar in the CF11 install lib directory. Which on windows is C:\Coldfusion11\cfusion\lib by default.

    Restart CF11 and then check its loaded up by looking at the system settings option in the CF administrator or by adding a db connection.

    tjguida
    tjguidaAuthor
    Participant
    October 27, 2015

    Thank you very much.  the file i downloaded was a zip file which contained multiple files.  It was not clear if i should place the zip file, or the unzipped folder into the lib directory.  I just placed the jar file, and everything is working fine.  Appreciate the help!