The solution provided by Borys worked for me.
Only change I did , instead of
sudo chown mysql:mysql /var/run/mysqld
I ran :-
sudo chown mysql:mysql /var/run/mariadb
The solution provided by Borys worked for me.
Only change I did , instead of
sudo chown mysql:mysql /var/run/mysqld
I ran :-
sudo chown mysql:mysql /var/run/mariadb
try chown mysql:mysql /var/run/mariadb/
This worked for me.
We are not even able to see the logs (as the service has not created any log /var/log/maridb/mariadb.log is empty). After running the ExecStartPre script maunally & restarting the service we are able to generate the logs file as well.
Solving this problem was pretty easy by entering " sudo yum update" , all the packages are updated including mariadb’s ones. then you can start the service of mariadb and everything will be working . that’s how it worked for me, after several tries of solutions provided by the community here.
It says directory is not empty when the directory does not exist so I’d say that’s bad error message.I noticed /var/lib/mysqld but not /var/lib/mysql as it was looking for. Simply renaming the directory made it possible to start the service.
Hi, I looked at the error log and tried a few possible fixes, but everything was misleading. In the end, the solution turned out to be quite silly.
yum update -y
systemctl start mairadb
This is the worst type of problem, there are 10 different issue that could go wrong.
But no, the correct approach is just try to update the system and then start mariadb !
In what universe we would realize this? Especially when the logs specify a completely different error:
Spent hours on this, changing permissions, finding socket file, finding above two environmental variable’s default values etc…
And for those who had the easy version: data dir mysql not found, that’s manageable: check the systemctl log for the error, then resolve mysql dir not found. This is ok.