Page 1 of 1

can't install ZM on Mint 20

Posted: Mon Jul 27, 2020 9:26 pm
by CliveMcCarthy
I'm trying to install ZM on Mint 20 (codebase Ubuntu 20.04 Focal Fossa).
I get an error message:
Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)
But I have faithfully executed the steps documented here https://zoneminder.readthedocs.io/en/st ... lt-db-user
I have NO experience with sql at all and I'm completely stuck.

Because the setup is so long and tedious :evil: 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
I'm stuck.
:roll:

Re: can't install ZM on Mint 20

Posted: Tue Jul 28, 2020 9:32 am
by SteveGilvarry
Don’t use Munt but here is script for Ubuntu 20.04 that will probably guide you. I suspect it is mysql_secure_installation.
Your error means the Zm account for db was not created and will also mean no zm db.

Re: can't install ZM on Mint 20

Posted: Tue Jul 28, 2020 8:08 pm
by CliveMcCarthy
Thanks. Did you mean to attach a script?

Re: can't install ZM on Mint 20

Posted: Tue Jul 28, 2020 10:47 pm
by SteveGilvarry

Re: can't install ZM on Mint 20

Posted: Mon Aug 10, 2020 2:13 am
by DVB Hardware
Does sound like a a db user account permission

My 1.35 is working and installed fine on mint 20.04, I just used the ubuntu 20.04 instructions

Jimmy