Comment 10 for bug 1914636

Revision history for this message
Yuan Song (moon396) wrote : Re: package mysql-server-8.0 8.0.23-0ubuntu0.20.04.1 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1

Looks like there is some environment handling issue during the migration. I found a way to clean up the issue.

1. dpkg -l |grep mysql
2. purge all mysql packages.
3. rm -rf /etc/mysql rm -rf /var/lib/mysql*
4. apt-get install mysql-server. this will work.

Looks like it is the /var/lib/mysql-files directory that caused the hang. It only contained some temporary files that had the following sql.

USE mysql;
INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';
SHUTDOWN;