Mariadb updates & systemd service file

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

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:

Be sure to read the forum FAQ about what to expect in the way of responses:
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

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.