Not sure if others have come across this on the new ubuntu 22.04 release, but here's what I did to fix this issue. Hopefully, others find this and it helps.
1) First, let's get the password
sudo cat /etc/mysql/debian.cnf
2) You will see something like below
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = jzh9noZcs3KvXvg8
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = supersecretstring
socket = /var/run/mysqld/mysqld.sock
3) Next, run mysql as root
sudo mysql
4) Now, ensure the debian-sys-maint account has the proper privs and password
GRANT ALL ON *.* TO 'debian-sys-maint'@'localhost';
alter user 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password';
5) All done. You can check by running the following command
NOTE: This will not remove any existing config
sudo dpkg-reconfigure zoneminder