[MDEV-14367] /etc/logrotate.d/mysql-server failure - error: 'Plugin 'unix_socket' is not loaded' Created: 2017-11-11  Updated: 2022-10-21  Resolved: 2020-05-21

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.2.10
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Laurent Declercq Assignee: Otto Kekäläinen
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

root@stretch:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.2 (stretch)
Release: 9.2
Codename: stretch


Issue Links:
Relates
relates to MDEV-14578 mysql_install_db --auth-root-authenti... Closed
relates to MDEV-29835 Partial server freeze Closed

 Description   

In MariaDB server 10.2.10 debian package (stretch), there is a LOGROTATE(8) configuration file that run a task that requires SQL root user privileges. Problem is that when upgrading from MariaDB 10.1 (package from Debian team) to MariaDB 10.2 (package from MariaDB team), the unix_socket authentication plugin that is enabled by default with MariaDB 10.1 get disabled and so, the log rotation fails:

root@stretch:~# logrotate -f /etc/logrotate.d/mysql-server
mysqladmin: connect to server at 'localhost' failed
error: 'Plugin 'unix_socket' is not loaded'
error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '

root@stretch:~# dpkg -S /etc/logrotate.d/mysql-server 
mariadb-server-10.2: /etc/logrotate.d/mysql-server

root@stretch:~# cat /etc/mysql/debian.cnf 
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = root
password = 
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = root
password = 
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

root@stretch:~# LANG=C apt-cache policy mariadb-server-10.2
mariadb-server-10.2:
  Installed: 10.2.10+maria~stretch
  Candidate: 10.2.10+maria~stretch
  Version table:
 *** 10.2.10+maria~stretch 1001
       1001 http://mirror.netcologne.de/mariadb/repo/10.2/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

As you can see above, the debian.cnf file doesn't contain any password for the SQL root user because when installing MariaDB using Debian package, the unix_socket auth plugin is activated by default. However when upgrading to MariaDB 10.2.10 (your package), the plugin get deactivated.



 Comments   
Comment by Otto Kekäläinen [ 2020-05-21 ]

Upgrading from Debian.org packages to MariaDB.org is not supported, not at least as long as MDEV-6284 is not completed. In it's current form it is too complex to support mixing two different set of packaging, thus this scenario cannot be supported for the time being.

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