Page 1 of 1

[SOLVED] SQL issue after update

Posted: Sun Jun 19, 2022 2:15 pm
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?

Re: SQL issue after update

Posted: Tue Jun 21, 2022 10:22 pm
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

Re: SQL issue after update

Posted: Thu Jun 23, 2022 3:19 am
by Trucker7
Found the problem. I was updating /etc/zm.conf instead of /etc/zoneminder/zm.conf. Good ole' Zoneminder is working fine again.