Skip to main content

Command Palette

Search for a command to run...

Day 9/100 of DevOps

Updated
1 min read

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.

  1. SSH into the Database Server with appropriate credentials.

    ssh peter@172.16.239.10

  2. Start the server once and check the status of MariaDB

    systemctl start mariadb

    systemctl status mariadb

  3. 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").

  1. Fix Permissions

    • If permission denied is the error, the /run/mariadb directory is likely the problem.

    • Fix ownership by running: sudo chown -R mysql:mysql /run/mariadb.

    • Adjust permissions: sudo chmod 755 /run/mariadb

  1. Restart the service and check the status

    systemctl restart mariadb

    systemctl status mariadb

  2. Verify the connection

    mysql -u root