Skip to main content
tjguida
Participant
Oct 25, 2015 1:42 AM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
    haxtbhCorrect answer
    Inspiring
    Oct 26, 2015 8:55 AM UTC

    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.

    8 replies

    Wafer
    Participant
    Mar 28, 2020 1:03 AM UTC

    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

     

    Translate
    Charlie Arehart
    Community Expert
    Community Expert
    Mar 28, 2020 1:28 AM UTC

    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. 

    Translate
    /Charlie (troubleshooter, carehart. org)
    Wafer
    Participant
    Mar 28, 2020 9:04 PM UTC

    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

    Translate
    WolfShade
    Legend
    Oct 26, 2015 1:19 PM UTC

    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,

    ^_^

    Translate
    haxtbhCorrect answer
    Inspiring
    Oct 26, 2015 8:55 AM UTC

    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.

    Translate
    tjguida
    tjguidaAuthor
    Participant
    Oct 27, 2015 4:33 PM UTC

    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!

    Translate