Unable to access WebUI after executing `chown -R librenms:librenms Weathermap/` and `chmod 775 /opt/librenms/html/plugins/Weathermap/configs`

hi all,
im a network engineer and i dont have a good background on SQL and php ,i was trying to setup the weathermap with librenms following the below article : Weathermap - LibreNMS Docs
once i get to step 2 and executed the commands chown -R librenms:librenms Weathermap/ and chmod 775 /opt/librenms/html/plugins/Weathermap/configs,i lost web access to the GUI and i have the error SQLSTATE[HY000] [2002] No such file or directory and below is the output of ./validate.php:
root@frieder:/opt/librenms# ./validate.php

====================================

Component Version
LibreNMS 1.47
DB Schema ?
PHP 7.0.27-0+deb9u1
MySQL ?
RRDTool 1.6.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[FAIL] Error connecting to your database.

[FAIL] You have no timezone set for php.
[FIX]:
http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
[WARN] Could not check poller/discovery, db is not connected.
[FAIL] fping could not be executed. fping must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(/usr/bin/fping: can’t create socket (must run as root?) : Permission denied)
[FAIL] fping should have CAP_NET_RAW!
[FIX]:
setcap cap_net_raw+ep /usr/bin/fping
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(/usr/bin/fping6: can’t create raw socket (must run as root?) : Permission denied)
[FAIL] fping6 should have CAP_NET_RAW!
[FIX]:
setcap cap_net_raw+ep /usr/bin/fping6
[FAIL] Some folders have incorrect file permissions, this may cause issues.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/storage/framework/views/96734e4a241f82904e0e55934f67f40e
any suggestions please on what we can do ?thank you in advance

That error means it cannot connect to the database. Check the credentials in .env and config.php

Hi Murrant,
thank you for your answer ,so when i check .env i find the below :
DB_HOST=localhost
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=password

#APP_URL=
NODE_ID=5bae272948b93
DB_PORT=3306
LIBRENMS_USER=librenms

but when i check the config.php ,it`s empty ,nothing there so i think i need to enter the below :
$config[‘db_host’] = ‘localhost’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘password’;
$config[‘db_name’] = ‘librenms’;
let me know if that what i need to do ,thank you in advance