*** This bug is a duplicate of bug 1592669 ***
    https://bugs.launchpad.net/bugs/1592669

A very similar problem happened today to me when upgrading mysql-
sever-5.7 from 5.7.30 to 5.7.31.

This is what happens in my Linux Mint 18.3 (based on Ubuntu 16.04):

Log started: 2020-07-29  11:41:51
Configurazione di mysql-server-5.7 (5.7.31-0ubuntu0.16.04.1)...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides 
LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' 
overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through 
socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: errore nell'elaborare il pacchetto mysql-server-5.7 (--configure):
 il sottoprocesso installato script di post-installation ha restituito lo stato 
di errore 1
Si sono verificati degli errori nell'elaborazione:
 mysql-server-5.7
Log ended: 2020-07-29  11:41:56

Please note my MySQL Server 5.7 service is DISABLED.
So, I followed the instructions from #7 (enable the service, start it, retry 
the package installation/upgrade, then disable the service again) and it fixed 
the upgrade process.

I suspect there is some flaw in these mysql-server-5.7 upgrade scripts
that don't take into account the case in which the user might have
disabled the service in order to start it just on demand, instead that
on each boot. And this flaw has not been fixed yet.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1605948

Title:
  mysql_upgrade: Got error: 2002: Can't connect to local MySQL server
  through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to
  the MySQL server

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1605948/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to