(SOLVED) Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)

Clinderw

Explorer
Joined
Aug 11, 2013
Messages
96
FreeNAS-11.3-U1
Updated ZM to v1.32.3

Alright...I updated ZM on two different iocage jails and after updating I ran into this issue...'Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)'. I've spend 8+ hours trying to reset the password, reinstall mysql or the db...doing a lot of stuff that didn't work.

Then, I saw in the logs the zmuser wasn't the right user...it was now trying to use dbuser...that didn't make sense.

I was about to give up and just start over (again!) but then...I found there are post-install notes in the jail. WHY DIDN'T I KNOW THAT? WHY DIDN'T ANYONE MENTION IT!

In the jails menu...bottom right corner
1584814759949.png

Click on 'Post Install Notes' (I replaced password with *s)
1584814827067.png

Holy sh*t that is what I've been looking for! Why did they change the user and password? I don't know...but whatever, this is what I needed.

Go to: iocage/jails/Zoneminder_2020/root/usr/local/etc (replace Zoneminder_2020 with your jail name) and edit the zm.conf file...

Replace the user and password with the one in the post install notes.
1584814912462.png


Restart the jail.

It should work now.

Hope this saves someone else frustration and time
 

Attachments

  • 1584814816966.png
    1584814816966.png
    31.6 KB · Views: 564

vambier

Cadet
Joined
Aug 20, 2018
Messages
6
Omg, so simple, I've been searching for an hour, you are a livesaver!!!!
I didn't have a post install button in the ui, but if you ssh into the jail(or go to the shell via the UI) there is a file called PLUGIN_INFO which also has this information. Thanks again!!!
 
Joined
Mar 12, 2016
Messages
2
This explains why my ZM system blew up if I updated. May I suggest that there might be something wrong in the update script?
 

Frank Collins

Explorer
Joined
Apr 10, 2019
Messages
53
I setup up ZM 1.34.6 in a 11.3 jail and it is working well. I will start a thread in the next day with easy instructions and full acknowledgement of my ignorance and the work done by @turtlepants.
 

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
FreeNAS-11.3-U1
Updated ZM to v1.32.3

Alright...I updated ZM on two different iocage jails and after updating I ran into this issue...'Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)'. I've spend 8+ hours trying to reset the password, reinstall mysql or the db...doing a lot of stuff that didn't work.

Then, I saw in the logs the zmuser wasn't the right user...it was now trying to use dbuser...that didn't make sense.

I was about to give up and just start over (again!) but then...I found there are post-install notes in the jail. WHY DIDN'T I KNOW THAT? WHY DIDN'T ANYONE MENTION IT!

In the jails menu...bottom right corner
View attachment 36753
Click on 'Post Install Notes' (I replaced password with *s)
View attachment 36755
Holy sh*t that is what I've been looking for! Why did they change the user and password? I don't know...but whatever, this is what I needed.

Go to: iocage/jails/Zoneminder_2020/root/usr/local/etc (replace Zoneminder_2020 with your jail name) and edit the zm.conf file...

Replace the user and password with the one in the post install notes.
View attachment 36756

Restart the jail.

It should work now.

Hope this saves someone else frustration and time

It didn't work for me, I still have the same problem.
 
Top