[CentOS] About mysql upgrade

Thu Apr 28 17:10:44 UTC 2016
Pete Travis <lists at petetravis.com>

On Apr 28, 2016 7:46 AM, "Sergio Belkin" <sebelk at gmail.com> wrote:
> Hi,
> I've found some issues upgrading mysql, some people recommends run
> mysql_upgrade. I wonder why such a script is not run from scriptlet of
> mysql-server rpm.
> Thanks in advance
> --
> --
> Sergio Belkin
> LPIC-2 Certified - http:// <http://www.lpi.org>www.l <http://www.lpi.org>
pi.o <http://www.lpi.org>rg <http://www.lpi.org>
> _______________________________________________

The general SOP is to restart mysql, then run mysql_upgrade, so the RPM
script would need to do both.  This brings you into database and
application management territory, and out of package management territory.
The RPM cannot know if it is acceptable and safe for the database to go
down, for  both your environment and organization.   Accordingly, as a
rule, RPMs should not affect running services.

Ubuntu/Debian packages *do* perform these actions on package update, and
I've seen it go horribly wrong. Like, the restart command hangs because of
long running queries, and the tablespace changes happen anyway, leaving the
daemon in a state where it cannot accept new connections because it was
shutting down, but cannot cleanly shut down because of the other actions in
the script.  You really want an admin to do this work, not an unattended