I was looking into upgrading my instance of MariaDB from 10.4 to 10.5, and according to https://mariadb.com/kb/en/upgrading-from-mariadb-104-to-mariadb-105/, I'm supposed to run mysql_upgrade or mariadb-upgrade as part of the upgrade procedure.
I didn't see this being done anywhere in docker-entrypoint.sh, so I ran it myself after restarting with the mariadb:10.5 image. According to the mysql_upgrade docs:
It's also safe to run
mysql_upgradefor minor upgrades, as if there are no incompatibles [sic] between versions it changes nothing.
So it seems like it might be a good idea to just always run it as part of startup to make version upgrades more seamless.
Duplicate of https://github.com/docker-library/mysql/issues/130#issuecomment-540947598
I'm not totally sure this is -- I think this is somewhere we could use a little guidance from @grooverdan on whether this is something recent versions of MariaDB do automatically like MySQL 8+ has started doing? :innocent: :pray:
Yep, I agree. Its a good thing to do. Even on minor upgrade there are things it corrects (JSON plugins from 5.7 data directories, mysql.user correctness to name two things I recently remember).
I think the most difficult problem is detection of _when_ it ought to be run because it requires the server to be up before it can run (so it requires the same temporary server logic as the initial bootstrapping), so it isn't reasonable to just run it every time (unless MariaDB's version has an offline mode? :innocent:)
Created https://jira.mariadb.org/browse/MDEV-25670 , might be possible without mysql_upgrade changes.
@timofeyturenko can you please have a look?
Most helpful comment
I'm not totally sure this is -- I think this is somewhere we could use a little guidance from @grooverdan on whether this is something recent versions of MariaDB do automatically like MySQL 8+ has started doing? :innocent: :pray: