Skip to content

Debian 13 / Zoneminder 1.38 Installscript => Missing Database password for zmuser #4603

@speefak

Description

@speefak

Hello, first of all, many thanks for your work and the new release. I have an installation script:

URL

I used it to install ZoneMinder 1.38 on a Debian 13 system, and I noticed that the installation did not complete cleanly. During the installation, I received a message that the ZoneMinder package was not installed correctly

          zoneminder (1.38.0~20260206.97-trixie) wird eingerichtet ...
          detected systemd
          Detected db service is mariadb.service
          Checking for db
          Db exists.
          Updating permissions for user zmuser@localhost
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          08.02.2026 09:23:21.047852 zmupdate[8426].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          08.02.2026 09:23:21.048296 zmupdate[8426].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          08.02.2026 09:23:21.049373 zmupdate[8426].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          Unable to connect to DB. ZM Cannot continue.
          BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
          Compilation failed in require at /usr/bin/zmupdate.pl line 75.
          BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 75.
          Error updating db. Trying with super-user privileges
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          08.02.2026 09:23:21.240517 zmupdate[8427].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          08.02.2026 09:23:21.240936 zmupdate[8427].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password:
           YES) at /usr/share/perl5/ZoneMinder/Database.pm line 115.
          08.02.2026 09:23:21.241896 zmupdate[8427].ERR [ZoneMinder::Database:119] [Error reconnecting to db: errstr:Access denied fo
          r user 'zmuser'@'localhost' (using password: YES) error val:]
          Unable to connect to DB. ZM Cannot continue.
          BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
          Compilation failed in require at /usr/bin/zmupdate.pl line 75.
          BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 75.
          Failed updating db. Please try manually by running: sudo zmupdate.pl
          dpkg: Fehler beim Bearbeiten des Paketes zoneminder (--configure):
           »installiertes post-installation-Skript des Paketes zoneminder«-Unterprozess gab den Fehlerwert 1 zurück
          Fehler traten auf beim Bearbeiten von:
           zoneminder

It seems that the password for the database user zmuser was either not set or set incorrectly:

I then changed the database password for zmuser as follows (read dbpass from zm.conf file):

ZM_PASS=$(grep '^ZM_DB_PASS=' /etc/zm/zm.conf | sed 's/^ZM_DB_PASS= *//; s/ *$//')
sudo mysql -e "ALTER USER 'zmuser'@'localhost' IDENTIFIED BY ${ZM_PASS@Q}; FLUSH PRIVILEGES;"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions