Database connection error

Valued Contributor

Anyone seen this before..
see attachedce65cc14e77f4009910c3f8eca4d1a3f

If you notice the top line user@inf-casper-t.local

Then at the bottom:



Valued Contributor

This is getting ridiculous now.. A whole day with JAMF support and NO further forward ///

All I'm trying to do is upgrade the JSS ...


Valued Contributor II

Is this a multi-server environment? I had something similar where my DMZ server lost routing to the internal server which hosted my DB.

Valued Contributor

interesting.. worth a look thanks

Valued Contributor II

Just re-reading my post, what I meant was in an upgrade it was written over, I think, in one of the .xml's pointing to where the database resides. Routing may not have been the best choice of words.

New Contributor III

Every time I've seen this, re-entering the jamfsoftware (or whatever you call the account with DB access) password under edit connection has resolved it. It looks like the database is hosted on the same server (or that's where it's looking) so it probably isn't the network. If you have root access to the database, try resetting the password and doing another GRANTALL for the account.

Contributor III
Contributor III

I actually love that screen as it typically means you didnt use the default username and/or password (which is a good thing) and add the fact that its actually generally very descriptive of the problem that tomcat is seeing as its just returning the errors it ran into.

So looking at the error its saying that mysql doesnt think your user at that host its connecting has been granted access. Since it is actually showing your user name is being denied that tells me that mysql isnt refusing connections (no bind address, firewall and the service is running) and is at the location you specified as those would be different errors that what is shown.

The JSS GUI should mirror the DataBase.xml but it doesn't hurt to check: /path/to/Tomcat/webapps/ROOT/WEB-INF/xml/DataBase.xml

Its typically recommended against using DNS in grants as mysql caches dns address and can cause problems plus its more layers of possible break down. Have you tried granting to the static IP of that server vs the DNS address? Taking tomcat out of it, have you tried using a mysql client app (client app binary, sequel pro, mysql workbench) to test connections?

You can verify your existing grants with:

SHOW GRANTS FOR UserName@HostName;

You can check all grants on your mysql system:

mysql 5.6 or before:

SELECT User, Host, Password FROM mysql.user;

mysql 5.7 or above:

SELECT User, Host, Authentication_String FROM mysql.user;

EDIT: I just noticed someone else mentioned that tomcat and mysql might be on the same box, if so, then your grant would be to username@localhost and localhost would go in the server address either in that error page or in the database.xml. If its showing that your user@hostname, hostname is what was entered in that error page and what its trying to connect with, but likely not what was granted. MySQL is very fickle/literal with its grants.