# Mariadb updates & systemd service file

**URL:** <https://forums.suse.com/t/mariadb-updates-systemd-service-file/30157>\
**Category:** SLES Configure-Administer\
**Created:** [August 10, 2017, 10:51pm UTC](https://forums.suse.com/t/mariadb-updates-systemd-service-file/30157 "2017-08-10T22:51:50Z")\
**Posts on this page:** 3\
**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:** [August 10, 2017, 10:51pm UTC](https://forums.suse.com/t/mariadb-updates-systemd-service-file/30157/1 "2017-08-10T22:51:50Z")

</div>

Question regarding the mariadb service files specifically the /usr/lib/mysql/mysql-systemd-helper update part

I see there is a upgrade option and this has me concerned. If a mariadb update occurs, the service file appears to have a prestart to run this option.

Is SUSE running a DB upgrade (equivalent to mysql\_upgrade) automatically after a mariadb patch\upgrade ?

If this is so where is the output of this run ? This information is very important if something goes bad during the upgrade. It has been my understanding that db upgrades should always be done interactively in the event of a problem so you can correct the problem and run the update again.

Thanks

---

<div class="post-metadata">

**Author:** ![Automatic\_Reply](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Automatic\_Reply](https://forums.suse.com/u/Automatic_Reply)\
**Post date:** [August 16, 2017, 7:30am UTC](https://forums.suse.com/t/mariadb-updates-systemd-service-file/30157/2 "2017-08-16T07:30:06Z")

</div>

cisaksen,

It appears that in the past few days you have not received a response to your  
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue  
is urgent or not getting a response, you might try one of the following options:

- Visit [http://www.suse.com/support](http://www.suse.com/support) and search the knowledgebase and/or check all  
the other support options available.
- Open a service request: [https://www.suse.com/support](https://www.suse.com/support)
- You could also try posting your message again. Make sure it is posted in the  
correct newsgroup. ([http://forums.suse.com](http://forums.suse.com))

Be sure to read the forum FAQ about what to expect in the way of responses:  
[http://forums.suse.com/faq.php](http://forums.suse.com/faq.php)

If this is a reply to a duplicate posting or otherwise posted in error, please  
ignore and accept our apologies and rest assured we will issue a stern reprimand  
to our posting bot…

Good luck!

Your SUSE Forums Team  
[http://forums.suse.com](http://forums.suse.com)

---

<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:** [August 17, 2017, 1:42pm UTC](https://forums.suse.com/t/mariadb-updates-systemd-service-file/30157/3 "2017-08-17T13:42:40Z")

</div>

On 10/08/17 20:54, cisaksen wrote:  
[color=blue]

> Question regarding the mariadb service files specifically the  
> _/usr/lib/mysql/mysql-systemd-helper update_ part
> 
> I see there is a upgrade option and this has me concerned. If a  
> mariadb update occurs, the service file appears to have a prestart to  
> run this option.
> 
> Is SUSE running a DB upgrade (equivalent to mysql\_upgrade) automatically  
> after a mariadb patch\upgrade ?
> 
> If this is so where is the output of this run ? This information is  
> very important if something goes bad during the upgrade. It has been my  
> understanding that db upgrades should always be done interactively in  
> the event of a problem so you can correct the problem and run the update  
> again.[/color]

Given nobody else has replied here’s my input.

/usr/lib/mysql/mysql-systemd-helper is a script which when passed the  
upgrade parameter (I guess update was a typo on your part) runs the  
mysql\_upgrade function which starts with the comment “Run mysql\_upgrade  
on every package install/upgrade. Not always necessary, but doesn’t do  
any harm.”

Reading through the function it starts a protected instance of MySQL  
(a.k.a. MariaDB) which logs to $protected/log\_upgrade\_run where  
$protected has earlier been set to a temporary directory.

The upgrade then happens which echoes success or failure to the console  
so I think this should be captured in a log file in /var/log/mysql/.

After this the temporary directory $protected is deleted thus  
log\_upgrade\_run is also deleted. Now whether this is wise …

Note for official SUSE input you should open an incident with SUSE  
Technical Support. If you do so I would be interested in any feedback.

## 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.
