There is a critical issue going on with the Nautilus application in Stratos DC. The production team identified that the application is unable to connect to the database. After digging into the issue, the team found that the MariaDB service is down on the database server.
Task: Fix the issue
ssh peter@172.16.239.10 Sp!dy
sudo systemctl status mariadb
○ mariadb.service - MariaDB 10.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
Active: inactive (dead) since Tue 2025-09-02 08:46:06 UTC; 1min 35s ago
sudo systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code.See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details
sudo journalctl -xeu mariadb.service
Sep 02 08:48:31 stdb01.stratos.xfusioncorp.com mariadb-prepare-db-dir[2236]: Database MariaDB is not initialized, but the directory /var/lib/mysql is not empty, so initialization cannot be done.
sudo ls -lah /var/lib/mysql
ls: cannot access '/var/lib/mysql': No such file or directory
sudo mkdir /var/lib/mysql
sudo ls -lah /var/lib/mysql
total 12K
drwxr-xr-x 2 root root 4.0K Sep 2 08:53 .
drwxr-xr-x 1 root root 4.0K Sep 2 08:53 ..
sudo chown -R mysql:mysql /var/lib/mysql
sudo ls -lah /var/lib/mysql
drwxr-xr-x 2 mysql mysql 4.0K Sep 2 08:53 .
drwxr-xr-x 1 root root 4.0K Sep 2 08:53 ..
sudo systemctl restart mariadb
sudo systemctl status mariadb
● mariadb.service - MariaDB 10.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
Active: active (running) since Tue 2025-09-02 08:56:50 UTC; 43s ago
sudo systemctl enable mariadb <- Enable at boot - optional