Sorry, just got back from dinner and was able to do some more testing. I set the env variable "NO_START_ZM="1"", then started the MySQL server and it was fine. When I start zoneminder I get an error:
execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm line 627.
and
execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/bin/zmpkg.pl line 325.
So, I went to those lines and this is what they say:
Logger.pm Line 610-634
610 my $sql = 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )';
611 $this->{sth} = $ZoneMinder::Database::dbh->prepare_cached($sql) if ! $this->{sth};
612 if ( !$this->{sth} ) {
613 $this->{databaseLevel} = NOLOG;
614 Error("Can't prepare log entry '$sql': ".$ZoneMinder::Database::dbh->errstr());
615 return;
616 }
617
618 my $res = $this->{sth}->execute(
619 $seconds+($microseconds/1000000.0),
620 $this->{id},
621 ($ZoneMinder::Config::Config{ZM_SERVER_ID} ? $ZoneMinder::Config::Config{ZM_SERVER_ID} : undef),
622 $$,
623 $level,
624 $codes{$level},
625 $string,
626 $this->{fileName},
627 );
628 if ( !$res ) {
629 $this->{databaseLevel} = NOLOG;
630 Error("Can't execute log entry '$sql': ".$ZoneMinder::Database::dbh->errstr());
631 }
632 } # end if doing db logging
633 } # end if level < effectivelevel
634 }
zmpkg.pl
320
321 # PP - First, make sure default exists and there is only one
322 my $sql = 'SELECT `Name` FROM `States` WHERE `Name`=?';
323 my $sth = $dbh->prepare_cached($sql)
324 or Fatal("Can't prepare '$sql': ".$dbh->errstr());
325 my $res = $sth->execute('default')
326 or Fatal("Can't execute: ".$sth->errstr());
327
I am not sure what these lines are telling me, this is above my head unfortunately