diff options
author | Daniel Black <daniel@mariadb.org> | 2020-09-17 10:36:25 +1000 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2020-09-17 10:42:49 +1000 |
commit | caed74bac9f793afbed75d60936622900450a422 (patch) | |
tree | 0876c527ba2457254822d1b3680c49f5f7ac8caa | |
parent | 5f2728d594bf0202afebeff2323324df79b50425 (diff) | |
download | mariadb-git-bb-10.5-MDEV-22678-danielblack-pr1670.tar.gz |
MDEV-22678: Debian Upgrade from MySQL-5.7 CE fails with "Plugin 'auth_socket' is not loadedbb-10.5-MDEV-22678-danielblack-pr1670
MySQL.com packages can be root auth_socket only. MariaDB uses unix_socket.
As the root user, as the default Debian maintaince user now, needs to
be accessible to run mariadb-upgrade for a start, we make it accessible
again.
closes #1670
-rw-r--r-- | debian/mariadb-server-10.5.postinst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/mariadb-server-10.5.postinst b/debian/mariadb-server-10.5.postinst index 6decee78766..fc8ddb03993 100644 --- a/debian/mariadb-server-10.5.postinst +++ b/debian/mariadb-server-10.5.postinst @@ -103,6 +103,14 @@ EOF rmdir $mysql_upgradedir 2>/dev/null || true done + # Upgrading from mysql.com needs might have the root user as auth_socket. + # As this is needed to perform mariadb-upgrade, and mariadb uses unix_socket, + # change it now (MDEV-22678). To keep the impact minimal, we skip innodb + # and set key-buffer-size to 0 as it isn't used. + if [ -f "$mysql_datadir"/auto.cnf ]; then + echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" \ + | /usr/sbin/mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap + fi # Ensure the existence and right permissions for the database and # log files. Use mkdir option 'Z' to create with correct SELinux context. |