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.

2 Comments

trackback
  1. Mark Matthews Says:

    That “something” is MySQL. Users in the MySQL grants system are a pair, user + host they connect from. Before assuming that “localhost” fixes your problem, I would read up on how the privilege system works at http://dev.mysql.com/doc/refman/5.1/en/privilege-system.html, as it seems the login to localhost is matching some other user entirely?

  2. Michael Scepaniak Says:

    Thanks for the input Mark! I no longer maintain a Confluence installation, but this is good to know for future reference (and for anyone that finds this post).

    Mike….

 Follow comments for this post

Leave a Comment