Skip to main content
Question

Database Connection Error - Access Denied


Bcodom
Forum|alt.badge.img+4

Hi! I just recently installed the newest update this month, and I am unable to get access back into the JSS. This is the error message I get when I try to access the site:

Database Connection Error

The following error was encountered:

QueryException: Could not connect: Access denied for user 'jamfsoftware'@'localhost' (using password: YES) - An error occurred while connecting to the database. Verify the username, password, and database name, then try again

Please verify the following items:
MySQL is running on localhost
MySQL is accepting network connections
The user jamfsoftware@localhost has been granted privileges to the jamfsoftware database

I am running the JSS and SQL server on the same Windows server, and I have verified that Tomcat and MySQL services are running. Unfortunately I cannot get access to the MySQL command prompt as I do not know the root password.

Any help would be appreciated.

Thanks!

12 replies

PatrickD
Forum|alt.badge.img+9
  • Valued Contributor
  • 112 replies
  • March 5, 2017

Hi @ctktech, can you advise the exact JSS version you installed? eg 9.9X.XXXXXXXX and what you were on beforehand?

Cheers,
Pat


Bcodom
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 11 replies
  • March 5, 2017

Current Version: 9.97.1488392992

Previous Version: 9.97.1482356336

Previous version worked just fine. The current version is the one that was just released this past weekend.


PatrickD
Forum|alt.badge.img+9
  • Valued Contributor
  • 112 replies
  • March 6, 2017

Hmm I feared that was the case. I would probably speak with Jamf if you haven't already incase it is a larger issue with the new Hotfix.

Can you logon to the server and start the MySQL cli and confirm the credentials are correct (login with them?) and have access to the jamfsoftware DB?

Seriously though I jump on the phone to Jamf support.


Bcodom
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 11 replies
  • March 6, 2017

Yeah, I was afraid of that. I did reach out to my Jamf buddy yesterday morning, so I'm hoping to have him call me tomorrow morning ASAP. Thankfully, the database was backed up before the update took place, so at least the database will be recoverable.

When I login to the server and run the MySQL cli, I am prompted with a password, but unfortunately any password I use doesn't work. I get a "Access denied for user root@localhost" message on the cli (which I'm assuming means I typed in the wrong password).


PatrickD
Forum|alt.badge.img+9
  • Valued Contributor
  • 112 replies
  • March 6, 2017

:/ Sorry to hear. Do you have a test box that you can run up and install MySQL and restore one of your JSS DB backups to so you can login to that one and confirm that you do actually know the root password? Not that I'm doubting you but I know what these thing can be like especially if someone else was the one to build it initially.

Doesn't have to be anything special, you could even do it with a spare Mac if you have one lying around.


Forum|alt.badge.img+5
  • New Contributor
  • 7 replies
  • March 6, 2017

I've experienced this before, the issue for me was that the database.xml had the wrong permissions and keystore.jks was missing. I had to set the appropriate permissions and restore keystore.jks from the backup folder. This was on Linux though. I would check your database.xml to make sure it's right


Forum|alt.badge.img+7
  • Contributor
  • 40 replies
  • March 6, 2017

Bookmarking, as I saw the same issue on my Windows server when installing the latest JSS patch. My SQL database is on an external box.

I rolled back and everything is working again.

@ctktech Please post an update of the fix, if you would...


Forum|alt.badge.img+15
  • Esteemed Contributor
  • 719 replies
  • March 6, 2017

I saw the same issue this weekend upgrading to 9.97.1488392992. The fix for me was uninstalling the JSS completely via Add/Remove Programs then installing the JSS from scratch. Of course, this required adding my SSL cert, resetting Tomcat memory settings, connection pool settings, etc. Not ideal.


scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • 1285 replies
  • March 6, 2017

This thread below...

JSS Upgrade gone bad...


Bcodom
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 11 replies
  • March 7, 2017

So I found out that we had a previous snapshot in place back in July of 2016, so I reverted back to that snapshot (thank goodness for VMWare snapshots), and I upgraded to version 9.97.1482356336, and recovered the database to the most recent version (thankfully it was a snapshot before the botched upgrade). So I have recovered very well.

I would say the easiest option is to recover from a previous snapshot or backup if you are able to, otherwise it does look like you may have to reinstall the whole thing.


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

So I am now having the same issue as this but I have not performed any JSS upgrades. In my setup what is happening is that the server on my internal network is fine, but I'm getting the same error trying to let my DMZ server communicate with the internal DB. Everything was fine and then suddenly this? Didn't make any server changes, but network changes could have occurred but nothing I'm aware of.


Forum|alt.badge.img+10
  • Valued Contributor
  • 129 replies
  • October 31, 2019

I got the same error on my Linux JSS because I forgot to become root before issuing the command:

jamf-pro database backup

I was using JAMF Pro 10.15.1 and just upgraded to 10.16.1 this morning.


Reply


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