miracle occurs here|

Confluence Install – Datasource “Access denied for user” Error

December 21st, 2008 at 7:50 pm by Michael Scepaniak

I was trying to install a Confluence instance in my hosting account. I had gone through the install and setup successfully locally on my Mac. But the setup on the host was failing:

I kept receiving some sort of access error:
Access denied for user 'foo_user'@'dz64.dailyrazor.com' (using password: YES)

I tried establishing the database connection manually through DbVisualizer, which worked fine:

jdbc:mysql://domain.com:3306/db_name?autoReconnect=true

I looked more closely at the error and realized that something was appending the username with the individual server my account was being hosted on (i.e., dz64.dailyrazor.com). I had a hard time figuring out who was at fault – Confluence, Tomcat, DBCP, or MySQL.

The source of the problem appeared to be my Tomcat resource definition:

Googling around didn’t provide me any answers. I tried replacing “domain.com” in the “url” attribute with “dz64.dailyrazor.com”, but this didn’t achieve anything. In the end, I figured out that specifying “localhost” was the answer:

url="jdbc:mysql://localhost:3306/db_name?autoReconnect=true"

This is what I was doing on my Mac, but it took me a while to figure out that the same had to be done on my host.

If you enjoyed this post, you might want to follow this blog!

 Follow comments for this post

Leave a Comment