Mariadb from 12 sp0

I’m finally getting around to using the systemd version of mariadb and having trouble getting the database to start.

Past/background: Starting with 12 sp1 suse went from a init.d script to systemd to run mariadb. Well that didn’t work to well for as we had many DB servers running multiple instances and the systemd didn’t handle it well. So what we did was:

  1. add “.off” to the service files in /usr/lib/systemd/system
  2. copy the init.d script from 12 sp0 to /etc/init.d
  3. then run systemctl daemon-reload.
    This has worked for every DB server we had.

Now every time there’s an update to mariadb we have had to do this process. I’m trying to get away from it but i’m running into this problem.

Little more info: the database files are not in the default location that suse places them. We do use /etc/my.cnf and specify the file locations in here. That includes the multiple DB instances.

Not sure why it’s not working but after looking at the mysql-systemd-helper it appears to require that the files be in the default locations.

Any other ideas are welcome. Thanks

On 05/24/2017 02:24 PM, cisaksen wrote:[color=blue]

I’m finally getting around to using the systemd version of mariadb and
having trouble getting the database to start.

Past/background: Starting with 12 sp1 suse went from a init.d script to
systemd to run mariadb. Well that didn’t work to well for as we had
many DB servers running multiple instances and the systemd didn’t handle
it well. So what we did was:

  1. add “.off” to the service files in /usr/lib/systemd/system
  2. copy the init.d script from 12 sp0 to /etc/init.d
  3. then run systemctl daemon-reload.
    This has worked for every DB server we had.

Now every time there’s an update to mariadb we have had to do this
process. I’m trying to get away from it but i’m running into this
problem.[/color]

Yes, this is expected; do not touch files you do not own under
/usr/lib/systemd/system as those are package-owned and will be replaced.
They’re not configuration files; they’re default service unit files.
Treat them like non-configuration files.

But you want to change them, you say? That’s fine: copy them to
/etc/systemd/system and then modify them there. This is the place you
override the default service unit files. Alternatively, depending on the
changes, you can create drop-in files that only override certain parts of
the originals. Once you create these alternatives under
/etc/systemd/system and reload the daemon (as you have already figured out
to do) you’ll see the systemctl command show the files actually used, so
that’s helpful to see what is being used at runtime.
[color=blue]

Little more info: the database files are not in the default location
that suse places them. We do use /etc/my.cnf and specify the file
locations in here. That includes the multiple DB instances.

Not sure why it’s not working but after looking at the
mysql-systemd-helper it appears to require that the files be in the
default locations.[/color]

I have no idea about this, but maybe post the contents of the service unit
files in case they have something in them that overrides the my.cnf
somehow, though that seems odd.

Just to be clear, are you using MariaDB from SLES, or did you add it from
an outside source?


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Yes using the MariaDB from the SUSE Repos. Like I said they change the service file from sp0 (init.d) to (systemd) in sp1.

Messed everything up as I’m running multiple DB instances on the same server. Using the mysqld_multi command to manage. Catch - it no longer works with the systemd setup. We do have single instance servers, these are the ones i’m trying to move back to systemd service but the service just does seem to want to see the db locations specified in the my.cnf.

Looks like i’ll be opening a case with SUES. They’ve been good in the past we’ll see what they come with.

On 06/19/2017 03:44 PM, cisaksen wrote:[color=blue]

Looks like i’ll be opening a case with SUES. They’ve been good in the
past we’ll see what they come with.[/color]

Please let us know; I’m interested in hearing how this is managed now.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

On 19/06/17 22:44, cisaksen wrote:
[color=blue]

Yes using the MariaDB from the SUSE Repos. Like I said they change the
service file from sp0 (init.d) to (systemd) in sp1.[/color]

I’m a little confused as to which release of SLES12 you’re using - the
web tag says SLES12 SP2 yet you have referred to both SLES12 (SP0) and
SP1 in this thread.

With SLES12 (SP0) SUSE introduced MariaDB as a replacement for MySQL[1]
then with SLES12 SP1 they fully supported it[2] including providing a
helper script and systemd unit files[3].
[color=blue]

Messed everything up as I’m running multiple DB instances on the same
server. Using the mysqld_multi command to manage. Catch - it no longer
works with the systemd setup. We do have single instance servers, these
are the ones i’m trying to move back to systemd service but the service
just does seem to want to see the db locations specified in the my.cnf.[/color]

There’s no indication in the SP1 release notes that this isn’t supported.
[color=blue]

Looks like i’ll be opening a case with SUES. They’ve been good in the
past we’ll see what they come with.[/color]

I suspect they’ll want you to be running SLES12 SP2 if you’re not already.

HTH.

[1] https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12/#fate-313595
[2] https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP1/#Intro.New
[3] https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP1/#fate-319006

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Yes we are running SLES SP2, This problem started back when SP0 to SP1 the mariadb service went from init.d to systemd

SUSE Support has stated this to me today: Since 12 SP1 switched to mysql.service, it does not handle starting/shutting down multiple instances.

So for my server running multiple DB instances I will need continue to use the init.d script from SLES 12 SP0. Before the switched to systemd service files for the service.

But for my single instance servers I should be able to move to the systemd service files. Just going to have to tweak the my.cnf file a little.

On 20/06/17 22:34, cisaksen wrote:
[color=blue]

Yes we are running SLES SP2, This problem started back when SP0 to SP1
the mariadb service went from init.d to systemd

SUSE Support has stated this to me today: *Since 12 SP1 switched to
mysql.service, it does not handle starting/shutting down multiple
instances. *

So for my server running multiple DB instances I will need continue to
use the init.d script from SLES 12 SP0. Before the switched to systemd
service files for the service.

But for my single instance servers I should be able to move to the
systemd service files. Just going to have to tweak the my.cnf file a
little.[/color]

Interesting, thanks for reporting back.

I’m going to submit some feedback on the documentation as that’s now
quite clearly incorrect. Do you have a SR or bug number I can reference?
If so, please can you let me know via a PM?

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

UPDATE: https://www.suse.com/support/kb/doc/?id=7023920