MariaDB Troubleshooting guide

I am trying to work on the “MariaDB Troubleshooting” this is my first time. I don’t know how to get started with the troubleshooting.


systemctl status mariadb
check status of service by above command if it is not running please start service by
systemctl start mariadb

Check the log files.

I tried to start the service, with systemctl start mariadb. This what i am getting. Any help on this?

Before start mariadb please use below command
sudo chown mysql:mysql /var/run/mariadb

1 Like

Giving the solution this way really defeats the purpose of this.


why did we use this command?

sudo chown mysql:mysql /var/run/mariadb

1 Like

Hello, @Vikrant
To giving the ownership of the directory to mysql user and mysql group.

1 Like

Thankyou @Tej-Singh-Rana for the reply. Can you please tell how would we find we need to give ownership to sql group as nothing like this was mentioned in the error while starting mariadb . could you please suggest some material to read for this part.

Once you see that systemctl status and journalctl -xe are not useful, you should always search in /var/log/. In this case in /var/log/mariadb/ there is a mariadb.log saying mysqld have no permission to write in a folder. So changing the owner of that folder to mysql user permit to mysqld to write there.


For troubleshooting/solution video refer below. These videos are made just to help the community!

yeah… so where is thought process coming from? something like this is not really covered in the courses

I followed the steps illustrated in these posts and in the video, but it still doesn’t solve the issue. If someone could send me to where they explain this concept, I don’t mind learning it.