mysql-server-8.0.postinst tries to install nonexistent plugin and sets the wrong permissions

Bug #1972046 reported by Karoly Negyesi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

First note please that while Bionic https://packages.ubuntu.com/bionic-updates/amd64/mysql-server-5.7/filelist packaged auth_socket.so Focal does not do so. https://packages.ubuntu.com/focal/amd64/mysql-server-8.0/filelist

Yet /var/lib/dpkg/info/mysql-server-8.0.postinst tries to install it and even worse it uses despite it does not exist:

echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';" >> "$initfile"

After every MySQL upgrade I need to restart with --skip-grant-tables and undo this because it becomes impossible to log in.

Also

    for d in $mysql_statedir $mysql_filesdir $mysql_keyringdir $mysql_logdir $mysql_rundir
    do
      if [ ! -d "$d" -a ! -L "$d" ]; then mkdir "$d"; fi
      chown -R mysql:mysql $d
      chmod 0700 $d
    done

This makes /var/run/mysqld 0700 which makes it impossible for non-root users to access MySQL over the socket which is inside /var/run/mysqld

Revision history for this message
Paride Legovini (paride) wrote :

Hello Karoly and thanks for this bug report. auth_socket.so is now shipped as part of the mysql-server-core-8.0 package:

$ apt-file search auth_socket.so
mysql-server-core-8.0: /usr/lib/mysql/plugin/auth_socket.so

The package is installed as a dependency of mysql-server-8.0. Even if that's not the culprit, looks like you're facing an actual issue. If you believe that's a bug in Ubuntu, could you please provide us with steps to reproduce the problem from a clean Focal system? Thanks!

Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-8.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.