https://wiki.zoneminder.com/MySQL#Forgo ... _for_MySQL
MySQL and MariaDB in Debian based distros can have the root password changed with dpkg-reconfigure mysql-server-#.# where #.# is your server version (type dpkg-reconfigure mysql and hit tab). This does not affect the ZM database.
using debian 11, bullseye, dpkg-reconfigure mariadb-server-10.3 does nothing