Remote database errors - "('debian-sys-maint'@'localhost') does not exist"

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
pxl
Posts: 1
Joined: Tue Jun 18, 2019 9:16 am

Remote database errors - "('debian-sys-maint'@'localhost') does not exist"

Post by pxl »

Hi. I've got ZM running on a fresh Ubuntu 18.04 LTS server, and all was fine until I tried to use a remote MySQL server. I updated /etc/zm/zm.conf with the correct details, and restarted, with no errors. But I'm not getting events showing. When I try and force an event, I'm seeing this in the logs:

Code: Select all

ERR [zma_m5] [Can't insert event: The user specified as a definer ('debian-sys-maint'@'localhost') does not exist. sql was (INSERT INTO Events ( MonitorId, StorageId, Name, StartTime, Width, Height, Cause, Notes, StateId, Orientation, Videoed, DefaultVideo, SaveJPEGs, Scheme ) values ( 5, 1, 'New Event', from_unixtime( 1560849205 ), 1280, 720, 'Forced Web', 'Forced Web: ', 1, 1, 0, '', 0, 'Medium' ))]
Why is it using the 'debian-sys-maint'@'localhost' account, not the one referenced in zm.conf? The only place I can see that referenced is in /etc/mysql/debian.cnf, which I have renamed and restarted ZoneMinder with no effect. The local MySQL is stopped, but still installed (for now).

Thanks.
setovi
Posts: 2
Joined: Mon Sep 12, 2022 3:30 pm

Re: Remote database errors - "('debian-sys-maint'@'localhost') does not exist"

Post by setovi »

Too old post but maybe it will help whoever gets here through a google search.

That's not in a file or a ZoneMinder setting. It's in the database.

You can do a mysqldump and will find lines like:

/*!50003 CREATE*/ /*!50017 DEFINER=`debian-sys-maint`@`localhost`*/ /*!50003 TRIGGER `event_insert_trigger` AFTER INSERT ON `Events` FOR EACH ROW BEGIN


I solved it by substituting that user with the right zmuser for my environment, dropping the database, and restoring the mysqldump backup.
jerrypaulick
Posts: 6
Joined: Fri May 11, 2018 5:56 pm

Re: Remote database errors - "('debian-sys-maint'@'localhost') does not exist"

Post by jerrypaulick »

setovi wrote: Mon Sep 12, 2022 3:35 pm I solved it by substituting that user with the right zmuser for my environment, dropping the database, and restoring the mysqldump backup.
Yes, this does the trick. I've put more details on how to do that on my other post if anyone needed a hint as of how to go about it.
Post Reply