Page 1 of 3

Lamp Mariadb install error

Posted: Sun Nov 21, 2021 2:54 am
by DVB Hardware
I was having this problem
viewtopic.php?f=44&t=31306

I could not resolve (beyond my skills)
I wiped the pc and installed Linux Mint 20.2 again to be fresh
I've installed ZM many times before

I'm using https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x BUT FOR MASTER

The problem is with LAMP
After entering mysql_secure_installation
Prompted to enter (return) because of new install (no password established yet)
ERROR:
error 2002 (hy000): can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)

Is there something missing in the install steps ??
3 days of searching and trying...I give up

Re: Lamp Mariadb install error

Posted: Sun Nov 21, 2021 7:42 am
by Magic919
Just sounds like the DB is not running.

Re: Lamp Mariadb install error

Posted: Sun Nov 21, 2021 12:52 pm
by DVB Hardware
You know I was saying the same thing, but I cannot find my old zm wiki bash scripts.
I'm trying to make sure the server is for zm with its install commands.
Linux Mint 20.2 Cin

Re: Lamp Mariadb install error

Posted: Sun Nov 21, 2021 4:26 pm
by kitkat
It's not simply a case of

Code: Select all

service mariadb start
or

Code: Select all

systemctl start mariadb
is it?

Re: Lamp Mariadb install error

Posted: Sun Nov 21, 2021 6:03 pm
by DVB Hardware
Needs to start and always start on OS boot

Re: Lamp Mariadb install error

Posted: Tue Nov 23, 2021 2:34 pm
by DVB Hardware
I suspect it is my pc a P5Q with a Q6600 processor
I installed on my DV6 laptop no problem
Picking up newer retired PC today, I will swap out the hard drive to rule out the drive
Maybe there are instructions in MariaDB too new for the old processor /mb

Re: Lamp Mariadb install error

Posted: Tue Nov 23, 2021 3:10 pm
by Magic919
I'd be amazed if the hardware was a factor here.

Re: Lamp Mariadb install error

Posted: Tue Nov 23, 2021 10:50 pm
by kitkat
DVB Hardware wrote: Sun Nov 21, 2021 2:54 am Is there something missing in the install steps ??
Possibly.

They don't specifically mention enabling the database to start at boot, and it's possible that the installer doesn't do that. (They do mention it for ZM itself so it may even be normal to not auto-start or enable a service at installation time.)

I would probably expect

Code: Select all

systemctl enable mariadb
to work, or perhaps

Code: Select all

chkconfig mariadb on

Re: Lamp Mariadb install error

Posted: Thu Nov 25, 2021 2:51 pm
by DVB Hardware
I think I solved this

When I install the above lamp in the wiki it server mariadb 10.3 works fine
BUT

when I edit below it crashes
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following in the [mysql] area:
innodb_file_per_table = ON
innodb_buffer_pool_ size = 256M
innodb_log_file_size - 32M

I don't know if it is still needed, see my server config pic for current software versions
Still need to install zm

zm_server.jpg
zm_server.jpg (132.91 KiB) Viewed 38826 times

Re: Lamp Mariadb install error

Posted: Fri Nov 26, 2021 8:04 pm
by Magic919
Leave them out and crack on with ZM.

Re: Lamp Mariadb install error

Posted: Fri Nov 26, 2021 10:41 pm
by DVB Hardware
Thats the easy way out, If the bash script is in error based on using mariadb 10.3 it needs t be corrected before ZM gets "bashed" by people, youtube, FB, forums etc.
I don't want to see that happen

Jimmy

Re: Lamp Mariadb install error

Posted: Sat Nov 27, 2021 7:24 am
by Magic919
Take it up with the person that edits the wiki page. Looks like bbunge.

Re: Lamp Mariadb install error

Posted: Sat Nov 27, 2021 11:38 am
by DVB Hardware
Magic919 wrote: Sat Nov 27, 2021 7:24 am Take it up with the person that edits the wiki page. Looks like bbunge.

Thanks, I could not find any reference on that wiki page of the author

Re: Lamp Mariadb install error

Posted: Sat Nov 27, 2021 3:53 pm
by Magic919
You need to look at the history tab along the top.

Re: Lamp Mariadb install error

Posted: Sat Nov 27, 2021 8:50 pm
by kitkat
DVB Hardware wrote: Thu Nov 25, 2021 2:51 pm when I edit below it crashes
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following in the [mysql] area:
innodb_file_per_table = ON
innodb_buffer_pool_ size = 256M
innodb_log_file_size - 32M
You may need to delete the old log files after changing innodb_log_file_size.

Check the mariadb log for errors along the lines of

Code: Select all

InnoDB: Error: log file ./ib_logfile0 is of different size 0 123456789  bytes
InnoDB: than specified in the .cnf file 0 987654321 bytes!
(And indeed for errors generally!)

On CentOS the way that works for me is to shut down mariadb and make sure it does so cleanly; delete (or move or rename if you prefer) /var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1; restart mariadb and wait for it to recreate the files.

You may have to do something after changing innodb_buffer_pool_size as well, but I'm not entirely sure about that one.


e2a: There seems to be a space in innodb_buffer_pool_ size and if that's a copy/paste from the .cnf then it'll probably be throwing an error when it loads.