[SOLVED] SQL issue after update

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Trucker7
Posts: 2
Joined: Sun Jun 19, 2022 2:00 pm

[SOLVED] SQL issue after update

Post by Trucker7 »

I recently updated from OpenSuse 15.3 to 15.4 and ZoneMinder from 1.36.12 to 1.36.18.

When trying to start ZoneMinder, it fails with the following:

Code: Select all

DBI connect('database=zm;host=localhost','zm_admin',...) failed: Access denied for user 'zm_admin'@'localhost' (using password: YES) at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zm_admin',...) failed: Access denied for user 'zm_admin'@'localhost' (using password: YES) at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 110.
06/19/2022 10:06:54.585154 zmdc[9221].ERR [ZoneMinder::Database:114] [Error reconnecting to db: errstr:Access denied for user 'zm_admin'@'localhost' (using password: YES) error val:]
06/19/2022 10:06:54.585442 zmdc[9221].ERR [ZoneMinder::Database:114] [Error reconnecting to db: errstr:Access denied for user 'zm_admin'@'localhost' (using password: YES) error val:]
DBI connect('database=zm;host=localhost','zm_admin',...) failed: Access denied for user 'zm_admin'@'localhost' (using password: YES) at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Database.pm line 110.
06/19/2022 10:06:54.586272 zmdc[9221].ERR [ZoneMinder::Database:114] [Error reconnecting to db: errstr:Access denied for user 'zm_admin'@'localhost' (using password: YES) error val:]
Unable to connect to DB. ZM Cannot continue.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder/Config.pm line 257.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.26.1/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmdc.pl line 67.
BEGIN failed--compilation aborted at /usr/bin/zmdc.pl line 67.
I can access the DB myself with not problems, though, using the same username/password listed on /etc/zm.conf.

Code: Select all

gerardo@Lenovo:~> mysql zm -u zm_admin -p
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 22
Server version: 10.6.7-MariaDB MariaDB package

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [zm]> 
Any ideas?
Last edited by Trucker7 on Thu Jun 23, 2022 3:20 am, edited 1 time in total.
User avatar
iconnor
Posts: 1988
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: SQL issue after update

Post by iconnor »

It might be that zm defaults to connecting to localhost as opposed to unspecified host when connecting via console. Set password for zm_admin@localhost
Trucker7
Posts: 2
Joined: Sun Jun 19, 2022 2:00 pm

Re: SQL issue after update

Post by Trucker7 »

Found the problem. I was updating /etc/zm.conf instead of /etc/zoneminder/zm.conf. Good ole' Zoneminder is working fine again.
Post Reply