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

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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;"
dougmccrary
Posts: 1336
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

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

Post 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:
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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"?
dougmccrary
Posts: 1336
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

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

Post 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.
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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.
dougmccrary
Posts: 1336
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

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

Post 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.
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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!
User avatar
iconnor
Posts: 3266
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor »

I havn't had to touch any mysql config during zm install on a debian/ubuntu system.
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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?
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post by allanmacdonald »

I'm gonna start a new topic now.
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

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

Post 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
allanmacdonald
Posts: 16
Joined: Sun Mar 28, 2010 1:51 am

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

Post 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
Post Reply