The user specified as a definer ('debian-sys-maint'@'localhost') does not exist

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

The user specified as a definer ('debian-sys-maint'@'localhost') does not exist

Post by craver84 » Tue Jul 02, 2019 1:34 pm

I've just installed Debian 9.9.0 with zoneminder 1.32.3 and I imported my old DB backup (it came from Ubuntu 18.04)

Code: Select all

mysql  --user=root --password=[password] zm      < ZMbackup.SQL
but I have problems with the user that zm use to connect to the db

Code: Select all

TRIGGER command denied to user 'debian-sys-maint'@'localhost' for table 'Events_Month'
The user specified as a definer ('debian-sys-maint'@'localhost') does not exist

I tried to add a new user to mysql with the same root password, but it doesn't work...

Code: Select all

MariaDB [mysql]> select User,Password from mysql.user;
| User             | Password                                  |
| root             |                                           |
| zmuser           | *C1D2D6FC5C596AFB19FFC4331DF6DAA287749A3E |
| debian-sys-maint | *B332BC835CE65A37167E623E25F1F660A850C7BE |

how can I solve it?
may I use zmuser to connect to the db?
many thanks

Posts: 16
Joined: Sat Jun 23, 2018 6:56 pm

Re: The user specified as a definer ('debian-sys-maint'@'localhost') does not exist

Post by AfricanSwallow » Wed Jul 03, 2019 6:44 pm

is there a reason your zoneminder is using debian-sys-maint user instead of zmuser? Does the user/pass configured in /etc/zm/zm.conf allow you to login using mysql client manually from command line?

mysql -u zmuser -pzmpass
mysql -u debian-sys-maint -pzmpass

are you using debian-sys-maint to perform backups? if so, zoneminder should not be using that user necessarily, but just give that user read permissions to the zm database so it can perform those backups. You can also change the password for that user if you do wish to continue using it for zoneminder, but that may break functionality elsewhere if you are using that same mysql user for other tasks on the system.

I'd say either use the existing zmuser/zmpass or create a new one specifically for zoneminder and restart:
CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'yourZMPass';
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost';

Then edit your /etc/zm/zm.conf file and update accordingly. NOTE! You will also need to modify for your api configuration as i believe that is only configured during installation and if the msyql user is changed after that, api will break. I believe the file is /usr/share/zoneminder/www/api/app/Config/database.php and you'll want to modify this entry:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'login' => ZM_DB_USER,
'password' => ZM_DB_PASS,
'database' => ZM_DB_NAME,
//'ssl_ca' => ZM_DB_SSL_CA_CERT,
//'ssl_key' => ZM_DB_SSL_CLIENT_KEY,
//'ssl_cert' => ZM_DB_SSL_CLIENT_CERT,
'prefix' => '',
'encoding' => 'utf8',

Restart zoneminder afterwards.

Hope that helps,

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests