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.

Thanks

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?

@bleso_a
Before start mariadb please use below command
sudo chown mysql:mysql /var/run/mariadb
Thanks
Vijay

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

3 Likes

why did we use this command?

sudo chown mysql:mysql /var/run/mariadb

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

1 Like

Thankyou @player001 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.