Please forgive me for posting this here. I hate creating accounts in different forums just to ask for help
I have openhab installed and somewhat setup. (tring to use Zoneminer to use for recording cameras)
FYI: they are on the same server, and both where installed using sudo and apt
I have no idea how to use sql. I only follow tultorials that I found searching when I ran into trouble
I am running Ubuntu server 19.04
I followed the directions here
https://zoneminder.readthedocs.io/en/latest/installationguide/ubuntu.html#easy-way-ubuntu-18-04-bionic
found out the ppa doesn’t work with my version but there was zoneminer1.32.3 package with apt
installed and setup the sql user and the pass (changed the default and went through ZM
config files and changed there too)
but when I run the codes given on the page this happens
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
Enter password:
ERROR 1064 (42000) at line 741: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','Edit','','')' at line 1
mysql -uroot -p -e "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'Zmpass!1';"
mysql -uroot -p -e "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'Zmpasssudo apt update';"
Enter password:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Zmpasssudo apt update'' at line 1
so I logged into sql and ran this
mysql> grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'Zmpass!1';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Zmpass!1'' at line 1
still didnt work, but I continued on
when i tried starting the service this happens
[code]zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-02-28 11:25:10 EST; 10s ago
Docs: http://zoneminder.readthedocs.org/en/latest/
Process: 2124 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: DBI connect(‘database=zm;host=localhost’,‘zmuser’,…) failed: Access denied for user ‘zmuser’@‘localhost’ to database ‘zm’ at /usr/share/perl5/ZoneMinder/Config.pm lin
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: Can’t connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: BEGIN failed–compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: BEGIN failed–compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
Feb 28 11:25:10 SpaceScene zmpkg.pl[2124]: BEGIN failed–compilation aborted at /usr/bin/zmpkg.pl line 34.
Feb 28 11:25:10 SpaceScene systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
Feb 28 11:25:10 SpaceScene systemd[1]: zoneminder.service: Failed with result ‘exit-code’.
Feb 28 11:25:10 SpaceScene systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.[/code]
This is what those files say at the lines quoted
/usr/share/perl5/ZoneMinder/Config.pm line 166. } # end BEGIN
/usr/share/perl5/ZoneMinder.pm line 33. use ZoneMinder::Config qw(:all);
/usr/bin/zmpkg.pl line 34. use ZoneMinder;
I am at a loss as to what to do next. Can someone please help?