[MDEV-18768] Automate upgrades from MySQL 5.7 with auth_socket to MariaDB with our unix_socket Created: 2019-02-28  Updated: 2020-04-14  Resolved: 2020-04-14

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4.4
Fix Version/s: 10.4.13, 10.5.3

Type: Bug Priority: Minor
Reporter: Otto Kekäläinen Assignee: Otto Kekäläinen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-6284 Merge downstream Debian/Ubuntu packag... Closed
Relates
relates to MDEV-11170 MariaDB 10.2 cannot start on MySQL 5.... Closed
relates to MDEV-12484 Enable unix socket authentication by ... Closed

 Description   

I haven't checked what upstream MySQL 5.7 does, but since we implemented unix socket authentication in Debian MariaDB 10.0 the maintainers of MySQL 5.7 in Debian followed and also implemented their own version.

However these versions are slightly different, have different plugin names etc.
I wish MariaDB 10.4 (that now finally has upstream socket auth as well since https://jira.mariadb.org/browse/MDEV-12484) would include some kind of mariadb_upgrade magic that would detect usage of socket auth in MySQL 5.7 (or later) and convert that into something MariaDB can run with.

Fixing this bug would solve also downstream Debian MySQL 5.7 -> MariaDB 10.x upgrades since I would backport the upstream mariadb_upgrade improvements myself.

See current failure at e.g. https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/135254
https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/135254/artifacts/file/debian/output/debug/var-log-mysql/mysql/error.log

2019-02-27 17:34:43 0 [Note] InnoDB: Using Linux native AIO
2019-02-27 17:34:43 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-27 17:34:43 0 [Note] InnoDB: Uses event mutexes
2019-02-27 17:34:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-27 17:34:43 0 [Note] InnoDB: Number of pools: 1
2019-02-27 17:34:43 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-02-27 17:34:43 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-27 17:34:43 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-27 17:34:43 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-27 17:34:43 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-02-27 17:34:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-02-27 17:34:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-02-27 17:34:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-02-27 17:34:43 0 [Note] InnoDB: Waiting for purge to start
2019-02-27 17:34:43 0 [Note] InnoDB: 10.3.13 started; log sequence number 2937057; transaction id 2317
2019-02-27 17:34:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-02-27 17:34:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-02-27 17:34:43 0 [Note] InnoDB: Buffer pool(s) load completed at 190227 17:34:43
ERROR: 1054  Unknown column 'Password' in 'user'
2019-02-27 17:34:43 0 [ERROR] Aborting

 

$ echo 'SHOW DATABASES;' | mariadb
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded



 Comments   
Comment by Otto Kekäläinen [ 2019-02-28 ]

I think I can fix this myself in upstream. I'll do similar changes to upgrade scripts as in https://github.com/mariadb/server/commit/7c2d3c9b46a51fcde9e014ed41d5eb6b4fac3b85 and test is with something similar to https://github.com/MariaDB/server/blob/10.2/mysql-test/r/no_password_column-mdev-11170.result

Currently testing with https://salsa.debian.org/mariadb-team/mariadb-10.3/commit/b02a9baf3b6a8b343a085454bd706fa6f36cb1d0

Comment by Otto Kekäläinen [ 2019-03-31 ]

Fixed in https://salsa.debian.org/mariadb-team/mariadb-10.3/commits/gitlab-ci-mysql-upgrade - will soon submit upstream

Comment by Otto Kekäläinen [ 2020-03-14 ]

Status: PR https://github.com/MariaDB/server/pull/1453 still pending for final review.

Comment by Otto Kekäläinen [ 2020-04-14 ]

PR was merged in https://github.com/MariaDB/server/commit/c1bdf62452139e9310d3234266802748ba4c74b8

Generated at Thu Feb 08 08:46:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.