Skip to main content
yashpalm70379645
Participant
March 16, 2020
Answered

Connection verification failed for data source - connection refused

  • March 16, 2020
  • 1 reply
  • 700 views

I am trying to connect to azure-mysql-db from non-azure vm but getting below error - 

- It's being allowed through firewall, I checked the logs but refusing by database.

 

Error -

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

 

Can anyone please help me with this.

    This topic has been closed for replies.
    Correct answer yashpalm70379645

    Thanks Charlie.

     

    Issue resolved .I figured it out, It was due to ' &serverTimezone=UTC ' parameter I was passing through jdbc connection string at coldfusion datasource configuration.

     

    Removed this particular parameter and it could able to fetch the date as it is from the database as well as printing the correct now date as well.

     

    So seems everything is perfect now.

    1 reply

    Charlie Arehart
    Community Expert
    Community Expert
    March 16, 2020

    You need to find out where the problem is. Otherwise, everyone will just be guessing.

     

    (Update, I added points 3 and 4 right after initially submitting this reply. I hope you may see that before responding, if perhaps you saw the response as sent to you from this forum when I first posted it, as this update will also be sent.)

     

    1. First, let's find out if the problem is really in CF or not, or on the CF machine or not. Have you implemented any mysql client on the same machine running CF? And can it connect to the mysql? If not, then the problem is NOT in CF but in either the machine running CF, the machine running mysql, or something in between (perhaps a firewall you are not thinking of).
    2. If you CAN connect to it from within a mysql client on the CF server, are you using exactly the same connection values (server, port, username, and password) as being used in CF?
    3. Are you telling the CF Admin connection to the DB to use SSL, TLS, or any other form of encryption?  Even if not, it could be implied by the port you are using for MySQL. What is it?
    4. And in either case, what is the JVM you are using (that CF points to)? It's listed on the CF admin"settings summary" page. That may play a factor in what is supported, in a call from CF to any resource secured by TLS/SSL.

     

    Let's hear your answers to those before making still more guesses. (Or maybe someone else will jump in seeing an answer already.)

    /Charlie (troubleshooter, carehart. org)
    yashpalm70379645
    yashpalm70379645AuthorCorrect answer
    Participant
    March 17, 2020

    Thanks Charlie.

     

    Issue resolved .I figured it out, It was due to ' &serverTimezone=UTC ' parameter I was passing through jdbc connection string at coldfusion datasource configuration.

     

    Removed this particular parameter and it could able to fetch the date as it is from the database as well as printing the correct now date as well.

     

    So seems everything is perfect now.

    Charlie Arehart
    Community Expert
    Community Expert
    March 17, 2020

    Good to hear it's resolved. It's curious to hear that that conn string value alone would cause that error.  But the steps in my points 1 and 2 would have helped confirm if it had to be something set in CF. 🙂 

     

    Thanks for the update. 

    /Charlie (troubleshooter, carehart. org)