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; -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1914636 Title: 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 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1914636/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs