Hi all,
I am trying to connect Jira to a MySQL database and I always get an error, that the user can not connect to the database.
I already checked this on the console and there I can connect to the database.
I think, the problem is, that even if I use "localhost" as server, Jira tries to connect with "jirauser"@127.0.0.1 instead of "jirauser"@"localhost".
Any ideas how I can tell jira to connect to the database using the hostname instead of the IP?
Try using the `mysql` client on the operating system to test. ( Man page )You'd use a syntax something like this:
mysql -u jirauser -p -h 127.0.0.1 jiradb
This will try to connect to 127.0.0.1 as "jirauser" and prompt you to enter a password. Once it successfully connects, it will use the "jiradb" database. Assuming all goes well, you will get a mysql shell prompt. If things don't go well, you may bet a more useful error message that will help you troubleshoot. If you are connecting to a remote MySQL server, you will need to grant permissions from the IP of your Jira server and connect to the IP of the MySQL server (instead of 127.0.0.1.)
Pro tip: Older versions of MySQL don't support some special characters ( @ symbol being one that we see a lot.) Try using a password with just letters and numbers if you're using a password with special characters.
I remember now that I had jdbc driver compatibility issues and had to go back a couple of versions on MySQL to resolve it. Might have just been a Mac issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your help. If I try to connect 127.0.0.1 it does not work "Access denied for 'jirauser'@'127.0.0.1' (using Password YES)".
If I do the same with localhost, it works. So it seems, that the Problem is, that Jira replaces localhost with 127.0.0.1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
are you saying @Dave Theodore [Coyote Creek Consulting] suggestion for MySQL command line doesn’t work for 127.0.0.1 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm not sure is this relevant but i've noticed my own MySQL installation has both options defined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does your dbconfig.xml look like.
I don’t think the localhost. Vs 127.0.0.1 should make a difference. It took a while on my Mac to get them to play nicely but this wasn’t one of the issues
more info here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.