I get an error message:
But I have faithfully executed the steps documented here https://zoneminder.readthedocs.io/en/st ... lt-db-userUnable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)
I have NO experience with sql at all and I'm completely stuck.
Because the setup is so long and tedious I put together a simple script based on the document:
Code: Select all
##!/bin/bash
# This Bash Script installs the components for ZoneMinder
sudo apt install tasksel -y
sudo tasksel install lamp-server
# During installation it will ask you to set up a master/root password for the MySQL.
# it didn't even when I first tried to install maually
# To better manage the MySQL server it is recommended to copy the sample config file
# and replace the default my.cnf symbolic link.
sudo rm /etc/mysql/my.cnf -v
sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf -v
echo "press Enter to continue"
read anything
# To change MySQL settings:
sudo xed /etc/mysql/my.cnf # xed is the Mint text editor
# In the [mysqld] section add the following: sql_mode = NO_ENGINE_SUBSTITUTION
sudo systemctl restart mysql
sudo apt install zoneminder -y
sudo chmod 740 /etc/zm/zm.conf
sudo chown root:www-data /etc/zm/zm.conf
sudo chown -R www-data:www-data /usr/share/zoneminder/
sudo a2enmod cgi
sudo a2enmod rewrite
sudo a2enconf zoneminder
sudo a2enmod expires
sudo a2enmod headers
sudo systemctl enable zoneminder
sudo systemctl start zoneminder
#sudo xed /etc/php/7.2/apache2/php.ini
# that php file doesn't exist !
#[Date]
#; Defines the default timezone used by the date functions
#; http://php.net/date.timezone
#date.timezone = America/Los_Angeles
sudo systemctl reload apache2
echo "done... press Enter"
read anything