When mariadb is started via mysqld service name, it does not blocks until it gets ready.
> systemctl stop mysqld; systemctl start mysqld; mysql -u root -S/var/lib/mysql/mysql.sock
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
unlike when doing it via mariadb service name:
> systemctl stop mariadb; systemctl start mariadb; mysql -u root -S/var/lib/mysql/mysql.sock
> Welcome to the MariaDB monitor. Commands end with ; or \g.
> Your MariaDB connection id is 3
> Server version: 10.0.14-MariaDB MariaDB Server
Happens with mariadb-server-10.0.14-6.fc21.x86_64.
As possible fix/workaround seems it's enough to add
After=mariadb.service to mysqld.service file, like:
> --- /usr/lib/systemd/system/mysqld.service 2014-10-22 16:20:26.475000000 +0000
> +++ /usr/lib/systemd/system/mysqld-fix.service 2014-10-22 16:20:24.042000000 +0000
> @@ -1,6 +1,7 @@
> Description=MySQL compatibility service (another name for mariadb.service; you should use mariadb.service instead)
then do systemctl daemon-reload, and even version with "mysqld" as service name works.
I appplied your proposed fix and can confirm that it is working.
mariadb-10.0.14-7.fc21 has been submitted as an update for Fedora 21.
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-10.0.14-7.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
mariadb-10.0.14-7.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.