# Mariadb from 12 sp0

**URL:** <https://forums.suse.com/t/mariadb-from-12-sp0/29837>\
**Category:** SLES Configure-Administer\
**Created:** [May 24, 2017, 11:22pm UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837 "2017-05-24T23:22:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [May 24, 2017, 11:22pm UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/1 "2017-05-24T23:22:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [May 25, 2017, 5:04am UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/2 "2017-05-25T05:04:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [June 20, 2017, 12:43am UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/3 "2017-06-20T00:43:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [June 20, 2017, 5:22am UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/4 "2017-06-20T05:22:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [June 20, 2017, 1:19pm UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/5 "2017-06-20T13:19:08Z")

</div>

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](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](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](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.

---

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [June 21, 2017, 12:30am UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/6 "2017-06-21T00:30:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [June 21, 2017, 2:21pm UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/7 "2017-06-21T14:21:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [June 10, 2019, 4:22pm UTC](https://forums.suse.com/t/mariadb-from-12-sp0/29837/8 "2019-06-10T16:22:17Z")

</div>

UPDATE: [https://www.suse.com/support/kb/doc/?id=7023920](https://www.suse.com/support/kb/doc/?id=7023920)
