Reputation: 1063
I'm trying to create a datasource to connect to a MySQL database. When I put in all my info I get this error:
Connection verification failed for data source: phoenix3 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
I can't seem to fix it. Any suggestions?
Upvotes: 5
Views: 4316
Reputation: 157
I had the same problem connecting to MySQL(installed via MAMP PRO 5) from Coldfusion 2018 and couldn't figure this out for days. MAMP PRO support not helpful.
I did the following to fix. All apps are on my local Macbook PRO:
Upvotes: 0
Reputation: 724
I got similar this and I found that the root cause is the mysql user that used in connection setup have not permission on that database.
Update permission for mysql user fixed my issue.
Upvotes: 0
Reputation: 2245
A better error message can be seen by looking at your ColdFusion exceptions.log when this happens.
I recently encountered a scenario where I got this message and by looking at the exceptions.log file I could see a message like:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'my_db_name'
Upvotes: 0
Reputation: 2132
You probably just changed the password, or the table privileges have been altered.
I have a mixed server running ColdFusion 9, PHP 5, and Ruby 1.9.2. I set up CF9 and MySQL and they were happy together. I named the CF user 'wwwrun' (legacy from a previous CFMX install of the same app). Later, I was setting up the PHP portion of my heterogeneous application and did a GRANT statement for a set of WordPress tables for the same user ('wwwrun')...but made the mistake of assigning a different password. The WordPress portion worked fine, but all of sudden my CF stuff was throwing this error.
Doh!
I had changed the password for the 'wwwrun' user. You may have inadvertently done the same. This is the error the JDBC driver gives when it fails password authentication. Not a very informative error message IMO.
Upvotes: 0
Reputation: 11054
Check your settings in mySql for max connections.
http://forums.mysql.com/read.php?39,181940,226710#msg-226710
Possibly MySql is blocking your CFserver for some reason, possibly too many login failures by your cf user? if so try flushing your hosts.
Upvotes: 3