Page 1 of 1

zmstats.pl mysql connection failed

Posted: Tue Sep 10, 2019 9:54 am
by bmberni
Hi Guys,

as I moved the local mysql instance to a central hosted instance everything looks fine for the first moment. (I changed the host from LOCALHOST to the new one in /etc/zm/zm.conf)
ZM starts up and shows some data (past events).
But it doesn't recognise new events (monitores are configured as modetect)
Unter system log (Web UI) is a error every minute:

Code: Select all

2019-09-10 11:52:17	zmstats		19548	ERR	The user specified as a definer ('zmuser'@'localhost') does not exist	zmstats.pl
But why localhost? I've changed it already in zm.conf.
Also added "host" to the array in /usr/share/zoneminder/www/api/app/Config/database.php:

Code: Select all

     public $default = array(
                'datasource' => 'Database/Mysql',
                'persistent' => false,
                'host' => ZM_DB_HOST,
		.
		.
		.
ZM Version is 1.33.14 on ubuntu 16.04 (all updates applied)

Thanks
Börny

Re: zmstats.pl mysql connection failed

Posted: Wed Sep 11, 2019 4:11 pm
by rockedge
check to see that the new instance of mysql has the user "zmuser" and the password defined. It appears that ZM is attempting to connect to the database but can not due to the missing user "zmuser" and password "zmpass" needed to make a successful connection