mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 07:05:33 +02:00
MDEV-22678: Debian Upgrade from MySQL-5.7 CE fails with "Plugin 'auth_socket' is not loaded
MySQL.com and Percona packages can be root auth_socket only. MariaDB uses unix_socket. As the root user, as the default Debian maintaince user, needs to be accessible to run mariadb-upgrade for a start, we make it accessible again.
This commit is contained in:
parent
25ede13611
commit
216ed17934
1 changed files with 13 additions and 0 deletions
13
debian/mariadb-server-10.5.postinst
vendored
13
debian/mariadb-server-10.5.postinst
vendored
|
|
@ -103,6 +103,19 @@ EOF
|
|||
rmdir $mysql_upgradedir 2>/dev/null || true
|
||||
|
||||
done
|
||||
# Upgrading from mysql.com needs might have the root user as auth_socket.
|
||||
# auto.cnf is a sign of a mysql install, that doesn't exist in mariadb.
|
||||
# We use lsof to protect against concurrent access by mysqld (mariadb has
|
||||
# its own projection). We make sure we're not doing this on a MySQL-8.0
|
||||
# directory.
|
||||
# This direct update is needed to enable an authentication mechanism to
|
||||
# perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we
|
||||
# skip innodb and set key-buffer-size to 0 as it isn't reused.
|
||||
if [ -f "$mysql_datadir"/auto.cnf ] && [ -f "$mysql_datadir"/mysql/user.MYD ] &&
|
||||
[ ! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null ] && [ ! -f "$mysql_datadir"/undo_001 ]; 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 2> /dev/null
|
||||
fi
|
||||
|
||||
# Ensure the existence and right permissions for the database and
|
||||
# log files. Use mkdir option 'Z' to create with correct SELinux context.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue