[CentOS] About mysql upgrade

Thu Apr 28 16:43:50 UTC 2016
m.roth at 5-cent.us <m.roth at 5-cent.us>

Lamar Owen wrote:
> On 04/28/2016 08:45 AM, Sergio Belkin wrote:
>> 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.
> Back in the Dark Ages of the PostgreSQL RPMset (PostgreSQL 6.5), early
> in my time as RPM maintainer for the community PostgreSQL.org RPMset, I
> asked a very similar question of some folks, and I got a canonical
> answer from Mr. RPM himself, Jeff Johnson.
>
> The answer is not very complex, but it was spread across a several
> message private e-mail thread.  The gist of it is that the RPM
> scriptlets are very very limited in what they can do.  Trying to do
> something clever inside an RPM scriptlet is almost never wise.  The key
> thing to remember is that the scriptlet has to be able to be run during
> the OS install phase (back when upgrades were actually supported by the
> OS installer that is now known as anaconda). Quoting this introductory
> section:
<MVNCH>

We have an answer we really like: yum-post-transaction-actions. Great
plugin... and it will do whatever you want... like, say: sed -i
s/sbin\/shutdown/bin\/false/ /etc/apcupsd/apccontrol

     mark "and are there three, or six, servers plugged ino the rackmount
            UPS? Yes."