mysql Unable to connect to ZM db

Forum for questions and support relating to the 1.31.x releases only.
DVB Hardware
Posts: 201
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

mysql Unable to connect to ZM db

Post by DVB Hardware »

I thought I would give a heads up on this.... using Linux mint 18.2 16.04 LAMP configured

After upgrading iconner zoneminder-master 1.31.1 8-14-17 update

error
mysql Unable to connect to ZM db.SQLSTATE[HY000] [2006] MySQL server has gone away

I did a new clean mint install and Iconner zonemindr 1.30.4 and worked fine
upgrade to 1.31.1 then failed with same error


Jimmy
Linux Mint 21 Cinnamon Mariadb 10.6.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: mysql Unable to connect to ZM db

Post by knight-of-ni »

This has already been fixed:
https://github.com/ZoneMinder/ZoneMinde ... f2762b2080

To get ZoneMinder working again, you should either roll back to the previous package or wait a day or so for our build system to crank out a new package.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: mysql Unable to connect to ZM db

Post by rockedge »

I lost my mind yesterday trying to troubleshoot this exact error attempting to install ZM on a XenialDog OS. ZoneMinder installed as expected using the iconner PPA and version 1.31.1 and ran error free UNTIL I rebooted the system. Mysql disappeared and I received the same error noted above. All the rest of the LAMP stack was okay. All attempts to fix it failed. Then started again with a fresh XenialDog(Ubuntu 16.04) and used the 1.30.4 stable branch and everything worked again before and after rebooting the system.

Is it the same? I don't know if it was the OS itself or how I had it installed (frugally) or how the Grub4Dos boot code affected the loading of a Save folder. But sounds similar to what the previous post presents.

UPDATE : I see the fix is in and will test it out to see if I was the OS causing the error (which I think is the fact)
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: mysql Unable to connect to ZM db

Post by knight-of-ni »

Yeah, we were all in the same boat. I was trying to test something else yesterday when my local build wouldn't work with the same "sql gone away message". Troubleshooting revealed a recent commit to add support for encrypted mysql connection had a bug.

Scroll to the end of this:
https://github.com/ZoneMinder/ZoneMinder/pull/1965

It is fixed now. This is why we test. Thank you being a guinea pig. :-)
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DVB Hardware
Posts: 201
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: mysql Unable to connect to ZM db

Post by DVB Hardware »

Well on the bright side I have a new clean mint 18.2 and lamp , replacing an 1 1/2 year upgrade

Jimmy
Linux Mint 21 Cinnamon Mariadb 10.6.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: mysql Unable to connect to ZM db

Post by bbunge »

You could always replace MySQL with Mariadb......
DVB Hardware
Posts: 201
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: mysql Unable to connect to ZM db

Post by DVB Hardware »

I did, I LOVE YOUR INSTALL SCRIPT !!!! nice work

is /etc/my.cnf the proper path for mariadb config I want to add nano to edit it
I always need to set lower_case_table_names=2, i run a point of sale software also
and can share the pos db between
windows and Mint test servers

Jimmy
Linux Mint 21 Cinnamon Mariadb 10.6.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: mysql Unable to connect to ZM db

Post by bbunge »

DVB Hardware wrote: Wed Aug 16, 2017 9:39 pm I did, I LOVE YOUR INSTALL SCRIPT !!!! nice work

is /etc/my.cnf the proper path for mariadb config I want to add nano to edit it
I always need to set lower_case_table_names=2, i run a point of sale software also
and can share the pos db between
windows and Mint test servers

Jimmy
https://wiki.zoneminder.com/Ubuntu_Serv ... Zoneminder
Vispen74
Posts: 17
Joined: Thu May 14, 2015 7:12 am

Re: mysql Unable to connect to ZM db

Post by Vispen74 »

Anyone know when a working build will be out on the iconnor repository?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: mysql Unable to connect to ZM db

Post by rockedge »

I think version 1.30.4 is rock solid stable. This version 1.31.1 is still the most forward and still in development code and is not yet a release.
Pedulla
Posts: 167
Joined: Thu Nov 27, 2014 11:16 am
Location: Portland, Or

Re: mysql Unable to connect to ZM db

Post by Pedulla »

Thank God! I thought I was going crazy last night.... Trying to build a new ZM 4 times from scratch. (I'm a glutton for punishment)
Question though, I used this link for install instructions:https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Both the install script and the do it yourself methods with and w/o MariaDB.
Does the
add-apt-repository ppa:iconnor/zoneminder
repository point to 1.30.4 or 1.31.x?

I thought it was 1.30.4. (this is where I'm a little deficient in knowledge).

If not, how do I set the repository to 1.30.4?
Thanks All


PS. I'll second that 1.30.4 is rock solid!
PS.PS - Just to be clear, I had this problem last night and the conversation sounds like it was fixed. What did I miss?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: mysql Unable to connect to ZM db

Post by rockedge »

points to 1.30.4

Code: Select all

add-apt-repository ppa:iconnor/zoneminder

I believe 1.31.1 is here ->

Code: Select all

add-apt-repository ppa:iconnor/zoneminder-master
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: mysql Unable to connect to ZM db

Post by rockedge »

I still haven't been able to build 1.31.1 from source yet either. I did not have any problems through version 1.30+ compiling ZM from source...now I make it to 88% and the build fails. So I use the iconner PPA to install ZM. That works great.
Pedulla
Posts: 167
Joined: Thu Nov 27, 2014 11:16 am
Location: Portland, Or

Re: mysql Unable to connect to ZM db

Post by Pedulla »

@rockedge, thanks for the clarification.

So something is amiss, or I've just become a complete moron....
Not sure why the zm database isn't getting created.

I'm in a PVE Container. Might that have anything to do with it?

There is no zm database in MariaDB.
Is there a command I can do to manually create the DB?
(1.30.4, Ubuntu 16.04, PVE Container)


PS. Moved my discussion over to 1.30.x forum...
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: mysql Unable to connect to ZM db

Post by rockedge »

when I install ZM on various flavors of Puppy Linux I also have to manually insert all the mysql db stuff, including user,ZM db...I usually install phpmyadmin to do it but using the command line ito prepare mysql or mariadb works just as well.
Locked