Troubleshooting
Problem
RTM fails to work because MariaDB cannot start
Symptom
Unable to connect to RTM GUI.
Seeing the following error in cacti log:
FATAL: Cannot connect to MySQL server on 'rtmdbhost'. Please make sure
you have specified a valid MySQL database name in 'include/config.php'
Seeing the following errors in /var/log/mariadb/mariadb.log
mysqld: can't create/write to file '/var/run/mariadb/mariadb.pid' (Errorcode: 2)
Can't start server: can't create PID file: no such file or directory
Cause
Directory /var/run/mariadb/ may not exist
Resolving The Problem
You can set up tmpfiles.d to manage the creation of this directory as follows:
Create /etc/tmpfiles.d/mariadb.conf (root:root with 644 permissions) with the following line.
D /var/run/mariadb 0755 mysql mysql -
Create the directory and verify:
# systemd-tmpfiles --create
# ls -ld /var/run/mariadb/
Now start mariadb:
# service mariadb start
Check if mariaDB has started (mysql -A). Also check the log file (/var/log/mariadb/mariadb.log).
Was this topic helpful?
Document Information
Modified date:
30 August 2019
UID
isg3T1024301