Wednesday 25 June 2014

Mysql Systemd won't start woes

After a Gentoo reinstall on my laptop (Thinkpad T420), I configured my system to use Systemd and KDE with UEFI (no secure boot obviously).
It now boots in less than 7 seconds (!) but I do encounter the occasional issue. There is something to be said for the simplicity and stability of openrc.

One issue I've encountered isn't related to systemd insomuch as mysql isn't properly configured when I install it. Please note, it's not just mysql that is affected, but mariadb as well.


Problem is this:

/var/run/mysqld did not exist and it needs to be set to mysql:mysql ownership. Once I did those two things, systemd could start mysqld.

If those do not work, try the following:

cd /usr/
/usr/share/mysql/scripts/mysql_install_db
mkdir /var/run/mysqld
chown -R mysql:mysql /var/run/mysqld
systemd start mysqld
/usr/bin/mysql_secure_installation

On that last step, I had no root password so pressing Enter at the prompt passed that question.

I hope this helps.

No comments:

Post a Comment