Skip to main content
Question

Database connection error


Forum|alt.badge.img+13
  • Valued Contributor
  • 389 replies

Anyone seen this before..
see attached

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

Then at the bottom:
inf-casperdb-t??

W.T.F!!!

6 replies

Forum|alt.badge.img+13
  • Author
  • Valued Contributor
  • 389 replies
  • December 20, 2017

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 ...

VERY POOR!!


easyedc
Forum|alt.badge.img+16
  • Esteemed Contributor
  • 623 replies
  • December 20, 2017

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


Forum|alt.badge.img+13
  • Author
  • Valued Contributor
  • 389 replies
  • December 20, 2017

interesting.. worth a look thanks


easyedc
Forum|alt.badge.img+16
  • Esteemed Contributor
  • 623 replies
  • December 20, 2017

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.


justin_smith
Forum|alt.badge.img+8
  • New Contributor
  • 23 replies
  • December 20, 2017

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.


Forum|alt.badge.img+22
  • Employee
  • 207 replies
  • December 20, 2017

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings