Last night I had to stop Zoneminder, and when I restarted it, it didn't come back up. I'm getting these errors in the log:
Starting ZoneMinder:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
May 23 14:09:45 18d28a2717c6 zmpkg[1040]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 96.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 147.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 34.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
May 23 14:09:45 18d28a2717c6 zmpkg[1040]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]
ZoneMinder failed to start
*** /etc/my_init.d/40_firstrun.sh failed with status 255
*** Killing all processes...
May 23 14:09:45 18d28a2717c6 syslog-ng[41]: syslog-ng shutting down; version='3.25.1'
I've found a post with a DBI Connect error and was able to start zoneminder with the a custom variable and start mysqld in safe mode. Then it produced an error log with this error:
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files.
What can I do to correct this?