When I go my server webpage this is what I get:
Unable to connect to ZM db.SQLSTATE[HY000] [2002] No such file or directory
Not sure where to go from here...
I tried running zmupdate.pl as I had seen in another post but this is what I got:
WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zm/zm.conf
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Database.pm line 81.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Database.pm line 81.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
05/23/2020 15:33:07.209612 zmupdate[785].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
05/23/2020 15:33:07.209935 zmupdate[785].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Database.pm line 81.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 91.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Database.pm line 110.
DBI connect('database=;host=','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.
05/23/2020 15:33:07.210445 zmupdate[785].ERR [ZoneMinder::Database:113] [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
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/bin/zmupdate.pl line 73.
BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 73.
Unable to connect to ZM db
Re: Unable to connect to ZM db
Sorry forgot to mention I'm on 1.35.4~20200515115321-bionic
Re: Unable to connect to ZM db
I think your problem is as simple as the wrong permissions are set for the ZM configuration directory /etc/zm!
insure that
/etc/zm
/var/cache/zoneminder
/var/log/zm
all are owned by the webserver and ZM user! In my case it is www-data most of the time
insure that
/etc/zm
/var/cache/zoneminder
/var/log/zm
all are owned by the webserver and ZM user! In my case it is www-data most of the time
Code: Select all
chown -R www-data:www-data /etc/zm
Re: Unable to connect to ZM db
I did sudo chown -R www-data:www-data /etc/zm and reboot but it didn't change anything.
Re: Unable to connect to ZM db
is the mysql server running?
Re: Unable to connect to ZM db
I'm not sure... what is the command to see and start if needed?
- bkjaya1952
- Posts: 282
- Joined: Sat Aug 25, 2018 3:24 pm
- Location: Sri Lanka
Re: Unable to connect to ZM db
Please try the procedure mentioned in this link below.
https://wiki.zoneminder.com/How_to_Inst ... cal_Fossa)
https://bkjaya.wordpress.com/2020/05/27 ... ker-image/
https://wiki.zoneminder.com/How_to_Inst ... cal_Fossa)
https://bkjaya.wordpress.com/2020/05/27 ... ker-image/
Re: Unable to connect to ZM db
I'm not running 20.04 and this is not a new install. I'm not sure what procedure you are referring to. I'm on 18.04.4bkjaya1952 wrote: ↑Sun May 31, 2020 6:00 am Please try the procedure mentioned in this link below.
https://wiki.zoneminder.com/How_to_Inst ... cal_Fossa)
https://bkjaya.wordpress.com/2020/05/27 ... ker-image/