On 10/08/17 20:54, cisaksen wrote:

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


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