Hi, In my case it was indeed a kind of local configuration problem.
I used to have my mysql root account configured with a blank password. When I upgraded some time ago (to 15.04 I guess, according to this bug report #1447808), the upgrade process decided to change the authentication plugin for my root account from mysql_native_password to auth_socket I changed back the plugin to mysql_native_password and that was it, I was still able to connect as root with no password (I'm totally aware that's no good practice, but I'm on my dev machine and I'm lazy) Earlier this month, another mysql server update "broke" again my root access, so I followed these instructions: http://askubuntu.com/a/784347/59479 Basically, it says to login from the command line as root using unix socket, to drop the root user and to create it back with a blank password. And it worked! But the last time I tried to upgrade mysql-server, I found myself with the present bug, with the upgrade process hanging while configuring mysql-server-5.7 package After some time, I found that the process was blocked on line 364 of /var/lib/dpkg/info/mysql-server-5.7.postinst where it detect if the root password is blank, and if so it tries to set the authentication plugin back to auth_socket with the following query: "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';" This query in my case was causing an error that the package manager was not able to recover from, which was causing it to hang. My Workaround was the following: (I did this while the upgrade process was hanging, which means the mysql server was up at that time) 1.- Connect from the command line to mysql, with mysql -u root -h 127.0.0.1 2.- Drop root user In my case I had to issue the following queries: DROP USER root@myhostname; DROP USER [email protected]; DROP USER root@'::1'; DROP USER root@'%'; 3.- Flush privileges (just in case) 4.- Create back root user WITH password CREATE USER 'root'@'%' IDENTIFIED BY 'SomeComplicatedPassword'; 5.- Flush privileges I then killed the upgrade process, removed the mysql server package with apt-get purge mysql-server-core-5.7 and installed it back with apt-get install mysql-server This time, the upgrade process detected that the root account had a password and did not try to set back the auth_socket plugin Now, everything is working again! Hope this helps! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1623440 Title: package mysql-server-5.7 5.7.15-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1623440/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
