Page 1 of 1

Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Thu Sep 02, 2021 7:41 pm
by allanmacdonald
Hi,

I am performing a new install of zoneminder after my old 16.04LTS machine crashed. I am now trying to install under 20.04LTS and ran into a confusing passage in the installation guide.

Under the heading "easy-way-ubuntu-18-04-bionic", at step 3, the instructions state, "Please note that these changes are NOT required for ZoneMinder 1.32+ and some people have reported them causing problems in 1.32.0." yet, in the very next paragraph, the instructions go on to say "To better manage the MySQL server it is recommended to copy the sample config file and replace the default my.cnf symbolic link." and seems to describe the very changes that are not supposed to be required.

My linear, programmatic-thinking brain gets confused by instructions like this. Am I to ignore the second paragraph? Should I assume there is an "else" or "otherwise" before the words "To better manage..."?

Code: Select all

$ apt-cache policy zoneminder
zoneminder:
  Installed: (none)
  Candidate: 1.32.3-2ubuntu2
  Version table:
     1.32.3-2ubuntu2 500
        500 http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
$
Also, a note in Step 5 states, "This step should not be required on ZoneMinder 1.32.0." How can this ever be? How does zoneminder create the new zm database without being granted permissions?

Thanks in advance.

Cheers,
Allan

Additional Info:

I tried running the "not required" stuff in Step 5 and mysql barfed on the second command with a syntax error. I think the correct second mysql command should be:

Code: Select all

mysql -u root -p -e "CREATE USER 'zmuser'@localhost identified by 'zmpass';grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute,references on zm.* to 'zmuser'@localhost;"

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Thu Sep 02, 2021 10:17 pm
by dougmccrary
It's got permissions because it's running as su.
And there were issues with permissions after install, but AFAIK they are now fixed. I could be wrong - haven't done a *new* install in awhile.
If I am wrong, there are a couple of ways around it posted here and there :roll:

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Thu Sep 02, 2021 10:27 pm
by allanmacdonald
If the mysql authentication plugin is "caching_sha2_password" instead of "auth_socket" for the root account, then how can the zoneminder installer be able to connect to mysql and do anything? Conversely, if the root's auth plugin is "auth_socket", then how can it be possible to succeed with the command "mysql -u root -p"?

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Thu Sep 02, 2021 10:41 pm
by dougmccrary
I don't really understand the how, but when I've used the "easy way" script modified for the zm version, it has worked, as I recall; I may have had the permissions problem but I don't recall. There may be a 20.04 script already.

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Thu Sep 02, 2021 10:56 pm
by allanmacdonald
Prior to installing zoneminder, I had the root auth plugin set to "caching_sha2_password" (for other reasons not related to zoneminder). The zm user never appeared in the user table of the mysql database when the installer completed. I then had to use the two mysql commands to create the database tables, create the zm user and grant the permissions.

I guess I can try dropping the zm database, removing the zm user, uninstall zm, change the root auth plugin back to "auth_socket" and start over to see what happens. However, this is a pain because the server does other things not related to zoneminder.

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 12:06 am
by dougmccrary
Duh, sorry it didn't register that you had existing database. :oops:
Not sure you have to do all that, but yeah, that should work. Most people use a standalone machine or vm for zm....

BTW, this should probably be in "ZoneMinder Distributions", not here, if you plan to stick with 1.32, or "ZoneMinder 1.34", which I would suggest for minimal problems and some pretty nice features.

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 3:18 pm
by allanmacdonald
I am still wondering about the original question I asked: after installing LAMP, am I supposed to skip the operations described in step3, after the words "To better manage"? I don't think that part of my question has been answered.

As far as which forum category this posting should be, I don't think the issue is really a bug or problem with the software - just the online instructions - I would defer to others whether or not this topic should be moved.

Thanks!

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 3:49 pm
by iconnor
I havn't had to touch any mysql config during zm install on a debian/ubuntu system.

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 6:58 pm
by allanmacdonald
I guess I need to move this topic to "ZoneMinder Distributions" as recommended by dougmccrary. Is there a way to do this or do I just open a new topic there and continue on with the discussion?

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 7:04 pm
by allanmacdonald
I'm gonna start a new topic now.

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 7:57 pm
by allanmacdonald
Before I go and rattle some more cages :lol:, I'm going to try out the instructions for 20.04LTS here:
https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.34.x

Might as well call this discussion closed.

Thanks to all who replied.
Allan

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Fri Sep 03, 2021 11:50 pm
by bbunge
Sorry for the confusion with all the install instructions out there.

This on on the WIKI does work and is pretty simple:

https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x

Re: Confused by installation guide - modify symlinks and edit my.cnf?

Posted: Mon Sep 06, 2021 4:12 pm
by allanmacdonald
@bbunge: Thanks for that! I actually had success with the 1.34 install :o and zoneminder is now up and running. I now have to actually get my cameras working but that's for another topic! :)

Cheers,
Allan