I have struggled with an issue on our test server running our Jira test instance. Problem was that I could not get it to connect to the database. Jira 5.0 has a script, config.sh, in the bin-folder which pops up an application allowing you to apply settings and then verify them, one of the settings being the information needed to connect to the database. So, I created the database for Jira, added the user and granted the needed access. No problem connecting using command line

mysql -u USERNAME -p DATABASENAME


but when trying “Test connection” using the Jira configuration tool it reported

Access denied for user 'USERNAME'@'LOCALHOST' (using password: YES)


Could not figure out why, until I connected as root and issued the following SQL-statement

SELECT user, password,host F R O M  mysql.user;

Note: I have some restrictions for my blog, so you need to edit F R O M

It showed that the encrypted password was not similar for my user for the two hosts which was defined, localhost and 127.0.0.1. I had recently updated for localhost and by the above error I thought that was sufficient, but now I also issued

SET PASSWORD FOR 'USERNAME'@'127.0.0.1' EQUALSIGN OLD_PASSWORD('PASSWORD');
SET PASSWORD FOR 'USERNAME'@'127.0.0.1' EQUALSIGN OLD_PASSWORD('PASSWORD');

Note: I have some restrictions for my blog, so you need to edit EQUALSIGN

ensuring equal passwords for both hosts, and voila, problem solved.