- Ubuntu 19.10 Server
- Apache 2.4.41
- MySQL 8.0.18
- PHP 7.3.11
1. Ensure all software is up to date
- sudo apt-get update
- sudo apt-get upgrade
- timedatectl set-timezone 'America/Edmonton'
- sudo apt install tasksel
- sudo tasksel install lamp-server
- sudo nano /etc/mysql/my.cnf
Code: Select all
[mysqld] sql_mode = NO_ENGINE_SUBSTITUTION
- sudo service mysql restart
- sudo add-apt-repository ppa:iconnor/zoneminder-1.32
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install zoneminder
- 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 mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
- sudo mysql -uroot -p -e "CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';"
- sudo mysql -uroot -p -e "GRANT ALL ON zm.* TO 'zmuser'@localhost;"
- sudo mysqladmin -uroot -p reload
- sudo nano /etc/apache2/apache2.conf
Code: Select all
KeepAlive On MaxKeepAliveRequests 50 KeepAliveTimeout 5
- sudo nano /etc/apache2/mods-available/mpm_prefork.conf
Code: Select all
<IfModule mpm_prefork_module> StartServers 4 MinSpareServers 3 MaxSpareServers 40 MaxRequestWorkers 200 MaxConnectionsPerChild 10000 </IfModule>
- sudo a2enmod cgi
- sudo a2enmod rewrite
- sudo a2enconf zoneminder
- sudo a2enmod expires
- sudo a2enmod headers
- sudo service apache2 restart
- sudo service zoneminder start
- hostname
- hostname -I
- http://[hostname]/zm/
Here are the results:
Code: Select all
Unable to connect to ZM db.SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Apparently this is because mySQL 8 uses a different method of authentication by default. Any ideas how to fix this?