MariaDB doesn't start on boot

The title says it all but I should add that of course I have the service turned on in services to start on boot.

This used to work so some upgrade somewhere has caused this to break. Once my system has booted I can start the DB no problem with

service mariadb start

Does anyone have any idea on how I could fix this so it starts on boot again like it used to and should?
I also ran

systemctl unmask mariadb

which didn’t help.

I use

systemctl enable mysqld

I do have mariadb and you can change mysqld but I have always used this (think its a link to mariadb). It’s a habit I’ve never got round to changing.

Interesting I did a

systemctl is-enabled mariadb

and because it came back as enabled I didn’t bother to do a

systemctl enable mariadb

. However, did it just now anyway and it came back with Created symlink

/etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.

so perhaps that link was missing.

As far as I see mariadb defines multiple links in [Install] section:

[Install]
WantedBy=multi-user.target
Alias=mysql.service

“systemctl is-enabled” returns success if any one link is present.

Well, that fixed it.

Thanks peteh100.

You’re welcome. Glad I could help.