zmstats.pl mysql connection failed

Forum for questions and support relating to 1.33.x development only.
Locked
bmberni
Posts: 2
Joined: Tue Sep 10, 2019 9:46 am

zmstats.pl mysql connection failed

Post 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
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: zmstats.pl mysql connection failed

Post 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
Locked