From e3d06ca1036336c8bdd98fe4b8a3ccc7f68a6acd Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 2 Nov 2015 16:54:52 -0500 Subject: [PATCH 01/16] added prev/next event ids --- web/api/app/Controller/EventsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 1afd3be1f..9c861c040 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -83,10 +83,14 @@ class EventsController extends AppController { } $options = array('conditions' => array('Event.' . $this->Event->primaryKey => $id)); $event = $this->Event->find('first', $options); + $this->Event->id = $id; + $event_neighbors = $this->Event->find('neighbors'); $path = $configs['ZM_DIR_EVENTS'].'/'.$this->Image->getEventPath($event).'/'; $event['Event']['BasePath'] = $path; + $event['Event']['Next'] = $event_neighbors['next']['Event']['Id']; + $event['Event']['Prev'] = $event_neighbors['prev']['Event']['Id']; $this->set(array( 'event' => $event, From 7cbad44ae4edd56a6e871059fecf1759f03c37dc Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 4 Nov 2015 14:23:28 -0500 Subject: [PATCH 02/16] also return the prev and next events for the same monitor as the current event --- web/api/app/Controller/EventsController.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 9c861c040..18de054a8 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -83,15 +83,23 @@ class EventsController extends AppController { } $options = array('conditions' => array('Event.' . $this->Event->primaryKey => $id)); $event = $this->Event->find('first', $options); + + $path = $configs['ZM_DIR_EVENTS'].'/'.$this->Image->getEventPath($event).'/'; + $event['Event']['BasePath'] = $path; + + # Get the previous and next events for any monitor $this->Event->id = $id; $event_neighbors = $this->Event->find('neighbors'); - - $path = $configs['ZM_DIR_EVENTS'].'/'.$this->Image->getEventPath($event).'/'; - - $event['Event']['BasePath'] = $path; $event['Event']['Next'] = $event_neighbors['next']['Event']['Id']; $event['Event']['Prev'] = $event_neighbors['prev']['Event']['Id']; + # Also get the previous and next events for the same monitor + $event_monitor_neighbors = $this->Event->find('neighbors', array( + 'conditions'=>array('Event.MonitorId'=>$event['Event']['MonitorId']) + )); + $event['Event']['NextOfMonitor'] = $event_monitor_neighbors['next']['Event']['Id']; + $event['Event']['PrevOfMonitor'] = $event_monitor_neighbors['prev']['Event']['Id']; + $this->set(array( 'event' => $event, '_serialize' => array('event') From 477e63a87827b8803cbe66211765fd5913b259f6 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Thu, 5 Nov 2015 17:19:58 +1100 Subject: [PATCH 03/16] Reorder RTSPDescribe to avoid -wreorder warnings --- src/zm_remote_camera_rtsp.cpp | 5 +++-- src/zm_rtsp.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/zm_remote_camera_rtsp.cpp b/src/zm_remote_camera_rtsp.cpp index 7e00a5d60..a07d97a8e 100644 --- a/src/zm_remote_camera_rtsp.cpp +++ b/src/zm_remote_camera_rtsp.cpp @@ -30,8 +30,9 @@ RemoteCameraRtsp::RemoteCameraRtsp( int p_id, const std::string &p_method, const std::string &p_host, const std::string &p_port, const std::string &p_path, int p_width, int p_height, bool p_rtsp_describe, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) : RemoteCamera( p_id, "rtsp", p_host, p_port, p_path, p_width, p_height, p_colours, p_brightness, p_contrast, p_hue, p_colour, p_capture ), - rtspThread( 0 ), - rtsp_describe( p_rtsp_describe ) + rtsp_describe( p_rtsp_describe ), + rtspThread( 0 ) + { if ( p_method == "rtpUni" ) method = RtspThread::RTP_UNICAST; diff --git a/src/zm_rtsp.h b/src/zm_rtsp.h index f5dcb9552..acd28e651 100644 --- a/src/zm_rtsp.h +++ b/src/zm_rtsp.h @@ -50,12 +50,13 @@ private: private: int mId; - bool mRtspDescribe; + RtspMethod mMethod; std::string mProtocol; std::string mHost; std::string mPort; std::string mPath; + bool mRtspDescribe; std::string mUrl; // Reworked authentication system From 6b994132f153b522767bf6efb3c30aaf553ea717 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 9 Nov 2015 12:34:11 -0500 Subject: [PATCH 04/16] grant create,index to zmuser when updating --- distros/debian/postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distros/debian/postinst b/distros/debian/postinst index d06f9c641..17d308fe4 100644 --- a/distros/debian/postinst +++ b/distros/debian/postinst @@ -15,7 +15,7 @@ if [ "$1" = "configure" ]; then # test if database if already present... if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + echo 'grant lock tables, alter,select,insert,update,delete,create,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql fi invoke-rc.d zoneminder stop || true @@ -47,6 +47,8 @@ if [ "$1" = "configure" ]; then chown www-data:www-data -R /var/cache/zoneminder else chown www-data:www-data /var/log/zm + + echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysq zmupdate.pl fi fi From 82edfc2f1681778db2cd38764969a29b23604ba9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 9 Nov 2015 12:34:24 -0500 Subject: [PATCH 05/16] grant create,index to zmuser when updating --- distros/ubuntu1504_cmake/zoneminder.postinst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/distros/ubuntu1504_cmake/zoneminder.postinst b/distros/ubuntu1504_cmake/zoneminder.postinst index e7810e468..e85dcf3ff 100644 --- a/distros/ubuntu1504_cmake/zoneminder.postinst +++ b/distros/ubuntu1504_cmake/zoneminder.postinst @@ -8,6 +8,16 @@ if [ "$1" = "configure" ]; then if [ -z "$2" ]; then chown www-data:www-data -R /var/cache/zoneminder fi + + # Do this every time the package is installed or upgraded + # Test for database presence to avoid failure of zmupdate.pl + + # Ensure zoneminder is stopped + deb-systemd-invoke stop zoneminder.service || exit $? + + # Run the ZoneMinder update tool + zmupdate.pl --nointeractive + fi #DEBHELPER# From ac76d224b8d17a8927bfd13e531a3766e8b6fe82 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 9 Nov 2015 12:36:23 -0500 Subject: [PATCH 06/16] grant create,index to zmuser when updating --- distros/ubuntu1504_cmake/zoneminder.postinst | 1 + 1 file changed, 1 insertion(+) diff --git a/distros/ubuntu1504_cmake/zoneminder.postinst b/distros/ubuntu1504_cmake/zoneminder.postinst index e85dcf3ff..4d2da7331 100644 --- a/distros/ubuntu1504_cmake/zoneminder.postinst +++ b/distros/ubuntu1504_cmake/zoneminder.postinst @@ -15,6 +15,7 @@ if [ "$1" = "configure" ]; then # Ensure zoneminder is stopped deb-systemd-invoke stop zoneminder.service || exit $? + echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql # Run the ZoneMinder update tool zmupdate.pl --nointeractive From 16274e46bcbbf1c199e4d6f5afe4d2e5823df59d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 9 Nov 2015 12:36:26 -0500 Subject: [PATCH 07/16] grant create,index to zmuser when updating --- distros/debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/postinst b/distros/debian/postinst index 17d308fe4..42a3bb1dc 100644 --- a/distros/debian/postinst +++ b/distros/debian/postinst @@ -48,7 +48,7 @@ if [ "$1" = "configure" ]; then else chown www-data:www-data /var/log/zm - echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysq + echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql zmupdate.pl fi fi From d231ac453341d7ddf42953a889c4e3a8a2723e60 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 10 Nov 2015 14:46:12 -0500 Subject: [PATCH 08/16] remove comment at end of line --- scripts/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 92fddf98d..5eacd8203 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -57,7 +57,7 @@ EXTRA_DIST = \ ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm \ ZoneMinder/lib/ZoneMinder/ConfigData.pm.in \ ZoneMinder/lib/ZoneMinder/Control.pm \ - ZoneMinder/lib/ZoneMinder/Control \ # Grab all ptz control skips under the Control folder + ZoneMinder/lib/ZoneMinder/Control \ ZoneMinder/lib/ZoneMinder/Trigger/Channel.pm \ ZoneMinder/lib/ZoneMinder/Trigger/Channel/Handle.pm \ ZoneMinder/lib/ZoneMinder/Trigger/Channel/Spawning.pm \ From 5e70146b0e051158e9d762af5d7473d18637a6ea Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 11 Nov 2015 16:43:57 -0500 Subject: [PATCH 09/16] Monitor->Frames, since we are updating Frames --- db/zm_update-1.28.107.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zm_update-1.28.107.sql b/db/zm_update-1.28.107.sql index 4d4c6432d..76fea0100 100644 --- a/db/zm_update-1.28.107.sql +++ b/db/zm_update-1.28.107.sql @@ -13,7 +13,7 @@ SET @s = (SELECT IF( AND table_schema = DATABASE() AND column_name = 'Id' ) > 0, -"SELECT 'Column ID already exists in Monitors'", +"SELECT 'Column ID already exists in Frames'", "ALTER TABLE `Frames` ADD COLUMN `Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT FIRST, DROP PRIMARY KEY, ADD PRIMARY KEY(`Id`)" )); From 0ee7b3d7299123f1debcaec083d27eaafe1117a4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 11 Nov 2015 16:54:41 -0500 Subject: [PATCH 10/16] add hostname to Servers table --- db/zm_update-1.28.109.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 db/zm_update-1.28.109.sql diff --git a/db/zm_update-1.28.109.sql b/db/zm_update-1.28.109.sql new file mode 100644 index 000000000..c23927e26 --- /dev/null +++ b/db/zm_update-1.28.109.sql @@ -0,0 +1,21 @@ +-- +-- This updates a 1.28.106 database to 1.28.107 +-- + +-- +-- Update Frame table to have a PrimaryKey of ID, insetad of a Composite Primary Key +-- Used primarially for compatibility with CakePHP +-- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Servers' + AND table_schema = DATABASE() + AND column_name = 'Hostname' + ) > 0, +"SELECT 'Column Hostname already exists in Servers'", +"ALTER TABLE `Servers` ADD COLUMN `Hostname` TEXT AFTER Name", +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; From a0d4934b848b3efa7c6aa039c37ba8cf7ba6f959 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 11 Nov 2015 16:56:28 -0500 Subject: [PATCH 11/16] Have PDO actually throw exceptions on db errors. Prior to this it would have been just failing silently. Also, fix a . to -> in the exception catcher. --- web/includes/database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/includes/database.php b/web/includes/database.php index b849405d9..2d7bfd7a9 100644 --- a/web/includes/database.php +++ b/web/includes/database.php @@ -32,6 +32,7 @@ function dbConnect() try { $dbConn = new PDO( ZM_DB_TYPE . ':host=' . ZM_DB_HOST . ';dbname='.ZM_DB_NAME, ZM_DB_USER, ZM_DB_PASS ); + $dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $ex ) { echo "Unable to connect to ZM db." . $ex->getMessage(); $dbConn = null; @@ -111,7 +112,7 @@ function dbQuery( $sql, $params=NULL ) { $result = $dbConn->query( $sql ); } } catch(PDOException $e) { - Fatal( "SQL-ERR '".$e.getMessage()."', statement was '".$sql."'" ); + Fatal( "SQL-ERR '".$e->getMessage()."', statement was '".$sql."'" ); } return( $result ); } From 551194227d35d7eb300a34fb841c2e6106e42083 Mon Sep 17 00:00:00 2001 From: abishai Date: Sun, 15 Nov 2015 21:40:25 +0000 Subject: [PATCH 12/16] compat for php 5.4 --- web/views/image.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/web/views/image.php b/web/views/image.php index 80377599f..de8205f76 100644 --- a/web/views/image.php +++ b/web/views/image.php @@ -40,6 +40,21 @@ if ( !canView( 'Events' ) ) header( 'Content-type: image/jpeg' ); +// Compatibility for PHP 5.4 +if (!function_exists('imagescale')) +{ + function imagescale($image, $new_width, $new_height = -1, $mode = 0) + { + $mode; // Not supported + + $new_height = ($new_height == -1) ? imagesy($image) : $new_height; + $imageNew = imagecreatetruecolor($new_width, $new_height); + imagecopyresampled($imageNew, $image, 0, 0, 0, 0, (int)$new_width, (int)$new_height, imagesx($image), imagesy($image)); + + return $imageNew; + } +} + $errorText = false; if ( empty($_REQUEST['path']) ) { From e00049f17a69eca4a61822244a55782a14954cf3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 16 Nov 2015 09:30:09 -0500 Subject: [PATCH 13/16] change format to native --- distros/ubuntu1204_cmake/source/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1204_cmake/source/format b/distros/ubuntu1204_cmake/source/format index 163aaf8d8..89ae9db8f 100644 --- a/distros/ubuntu1204_cmake/source/format +++ b/distros/ubuntu1204_cmake/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) From f322bde35c75da86b217472eb09e7ea42becf0e5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 16 Nov 2015 11:01:11 -0500 Subject: [PATCH 14/16] increase version to 109 because I at some point pushed a db update script --- CMakeLists.txt | 2 +- configure.ac | 2 +- version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea67474d6..c7be1ceec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required (VERSION 2.6) project (zoneminder) -set(zoneminder_VERSION "1.28.108") +set(zoneminder_VERSION "1.28.109") # make API version a minor of ZM version set(zoneminder_API_VERSION "${zoneminder_VERSION}.1") diff --git a/configure.ac b/configure.ac index 436be34cf..b9d4ef2ee 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # For instructions on building with cmake, please see INSTALL # AC_PREREQ(2.59) -AC_INIT(zm,1.28.108,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) +AC_INIT(zm,1.28.109,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR(src/zm.h) AC_CONFIG_HEADERS(config.h) diff --git a/version b/version index ca2c9c84c..a960d2a6d 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.28.108 +1.28.109 From 7f5958d873bc4f00739324f99741031c5a443f64 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 16 Nov 2015 11:01:41 -0500 Subject: [PATCH 15/16] remove comma that shouldn't be there --- db/zm_update-1.28.109.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zm_update-1.28.109.sql b/db/zm_update-1.28.109.sql index c23927e26..be6dca9f1 100644 --- a/db/zm_update-1.28.109.sql +++ b/db/zm_update-1.28.109.sql @@ -14,7 +14,7 @@ SET @s = (SELECT IF( AND column_name = 'Hostname' ) > 0, "SELECT 'Column Hostname already exists in Servers'", -"ALTER TABLE `Servers` ADD COLUMN `Hostname` TEXT AFTER Name", +"ALTER TABLE `Servers` ADD COLUMN `Hostname` TEXT AFTER Name" )); PREPARE stmt FROM @s; From 9052274d0d6ce0fbab6a57d50e79baf7a829d37f Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Tue, 17 Nov 2015 12:20:51 -0600 Subject: [PATCH 16/16] Update rpm documentation to reference index permission --- distros/fedora/README.Fedora | 16 ++++++++-------- distros/redhat/README.CentOS | 12 ++++++------ distros/redhat/README.Centos7 | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/distros/fedora/README.Fedora b/distros/fedora/README.Fedora index 3043d78fd..94b3c5712 100644 --- a/distros/fedora/README.Fedora +++ b/distros/fedora/README.Fedora @@ -11,9 +11,9 @@ What's New 2. The ZoneMinder config file, zm.conf, has been moved under /etc/zm. -3. The ZoneMinder mysql account now requires "Create" permission. This change - must be done manually before ZoneMinder will run. See the installation steps - below. +3. The ZoneMinder mysql account now requires "create" and "index" permission. + This change must be done manually before ZoneMinder will run. See the + installation steps below. 4. A new permission group called "Groups" has been added. This allows the system administrator to assign "view", "edit", or "none" permission to @@ -46,9 +46,9 @@ New installs mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql mysql -u root -p - mysql> grant select,insert,update,delete,lock tables,alter,create - on zm.* to 'zmuser'@localhost identified by 'zmpass'; - mysql> exit; + mysql> grant select,insert,update,delete,lock tables,alter,create,index + on zm.* to 'zmuser'@localhost identified by 'zmpass'; + mysql> exit; mysqladmin -u root -p reload The database account credentials, zmuser/zmpass, are arbitrary. Set them to @@ -113,8 +113,8 @@ Upgrades Over time, the database account permissions required for normal operation have changed. Verify the zmuser database account has been granted select, - insert, update, delete, lock tables, alter, and create permission to the - ZoneMinder database: + insert, update, delete, lock tables, alter, create, and index permission + to the ZoneMinder database: mysql -u root -p mysql> show grants for zmuser@localhost; diff --git a/distros/redhat/README.CentOS b/distros/redhat/README.CentOS index 05e2cb0ab..39586b7d3 100644 --- a/distros/redhat/README.CentOS +++ b/distros/redhat/README.CentOS @@ -1,9 +1,9 @@ What's New ========== -1. The ZoneMinder mysql account now requires "Create" permission. This change - must be done manually before ZoneMinder will run. See the installation steps - below. +1. The ZoneMinder mysql account now requires "create" and "index" permission. + This change must be done manually before ZoneMinder will run. See the + installation steps below. 2. A new permission group called "Groups" has been added. This allows the system administrator to assign "view", "edit", or "none" permission to @@ -32,7 +32,7 @@ New installs mysql -uroot -p mysql> create database zm; - mysql> grant select,insert,update,delete,lock tables,alter,create + mysql> grant select,insert,update,delete,lock tables,alter,create,index on zm.* to 'zmuser'@localhost identified by 'zmpass'; mysql> exit; mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql @@ -105,8 +105,8 @@ New installs Over time, the database account permissions required for normal operation have changed. Verify the zmuser database account has been granted select, - insert, update, delete, lock tables, alter, and create permission to the - ZoneMinder database: + insert, update, delete, lock tables, alter, create, and index permission + to the ZoneMinder database: mysql -u root -p mysql> show grants for zmuser@localhost; diff --git a/distros/redhat/README.Centos7 b/distros/redhat/README.Centos7 index 70e98b006..9bf9a8462 100644 --- a/distros/redhat/README.Centos7 +++ b/distros/redhat/README.Centos7 @@ -1,9 +1,9 @@ What's New ========== -1. The ZoneMinder mysql account now requires "Create" permission. This change - must be done manually before ZoneMinder will run. See the installation steps - below. +1. The ZoneMinder mysql account now requires "create" and "index" permission. + This change must be done manually before ZoneMinder will run. See the + installation steps below. 2. A new permission group called "Groups" has been added. This allows the system administrator to assign "view", "edit", or "none" permission to @@ -34,9 +34,9 @@ New installs mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql mysql -u root -p - mysql> grant select,insert,update,delete,lock tables,alter,create - on zm.* to 'zmuser'@localhost identified by 'zmpass'; - mysql> exit; + mysql> grant select,insert,update,delete,lock tables,alter,create,index + on zm.* to 'zmuser'@localhost identified by 'zmpass'; + mysql> exit; mysqladmin -u root -p reload The database account credentials, zmuser/zmpass, are arbitrary. Set them to @@ -100,8 +100,8 @@ Upgrades Over time, the database account permissions required for normal operation have changed. Verify the zmuser database account has been granted select, - insert, update, delete, lock tables, alter, and create permission to the - ZoneMinder database: + insert, update, delete, lock tables, alter, create, and index permission + to the ZoneMinder database: mysql -u root -p mysql> show grants for zmuser@localhost;