Day 9/100 of DevOps
Day 9: MariaDB Troubleshooting
Task: Task: There is a critical issue going on with the Nautilus application in Stratos DC. The production support team identified that the application is unable to connect to the database. After digging into the issue, the team found that mariadb service is down on the database server.
Look into the issue and fix the same.
SSH into the Database Server with appropriate credentials.
ssh peter@172.16.239.10
Start the server once and check the status of MariaDB
systemctl start mariadbsystemctl status mariadb
Check the logs
If the service is down, check the MariaDB error logs for details:
sudo tail -50 /var/log/mariadb/mariadb.log.Look for errors like
[ERROR] mariadbd: Can't create/write to file '/run/mariadb/mariadb.pid' (Errcode: 13 "Permission denied").


Fix Permissions
If permission denied is the error, the
/run/mariadbdirectory is likely the problem.Fix ownership by running:
sudo chown -R mysql:mysql /run/mariadb.Adjust permissions:
sudo chmod 755 /run/mariadb

Restart the service and check the status
systemctl restart mariadbsystemctl status mariadb
Verify the connection
mysql -u root