Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14367

/etc/logrotate.d/mysql-server failure - error: 'Plugin 'unix_socket' is not loaded'

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 10.2.10
    • N/A
    • Packaging, Platform Debian
    • None
    • 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

    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.

      Attachments

        Issue Links

          Activity

            People

              otto Otto Kekäläinen
              nuxwin Laurent Declercq
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.