MariaDB 10.4 and the authentication change on upgrade

10.4 changed the default authentication for the root account to unix_socket, so an upgrade produces a root that cannot log in with a password and a lot of confusion.

SELECT user, host, plugin FROM mysql.global_priv;
-- root  localhost  unix_socket

-- root from the shell as the unix root user: works, no password
-- root over TCP with a password: does not

ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password
  USING PASSWORD('...');

The socket default is genuinely more secure and it breaks every backup script that connects as root with a password from a config file. The user table also became a view over global_priv, so tooling that wrote to mysql.user directly stops working. Neither is documented prominently enough for the number of upgrades it surprises, and both are worth checking before the maintenance window rather than during it.