can't install ZM on Mint 20

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
Post Reply
CliveMcCarthy
Posts: 2
Joined: Mon Jul 27, 2020 9:07 pm

can't install ZM on Mint 20

Post 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:
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: can't install ZM on Mint 20

Post 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.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
CliveMcCarthy
Posts: 2
Joined: Mon Jul 27, 2020 9:07 pm

Re: can't install ZM on Mint 20

Post by CliveMcCarthy »

Thanks. Did you mean to attach a script?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: can't install ZM on Mint 20

Post by SteveGilvarry »

Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
DVB Hardware
Posts: 203
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: can't install ZM on Mint 20

Post 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
Linux Mint 23 Cinnamon Mariadb 10.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
Post Reply