@Robie, I am using sudo -i for package upgrades.
Typing:
sudo -i
cd ~
ls -al
I do not see a .my.cnf file.
So I do not have something to rename.

I solved my problem by temporarily removing the password for the mysql
root@localhost account. mysql_upgrade worked, although it expired the
user accounts I was working with.

Trying to reproduce the issue again, I uninstalled and then reinstalled
mysql-server (with mysql-server-5.7 & mysql-server-core-5.7) as root. It
failed again:

Setting up mysql-server-5.7 (5.7.11-0ubuntu5) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf 
(my.cnf) in auto mode
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' 
(using password: NO) while connecting to the MySQL server


then I tried as my normal user:

    sudo apt-get -f install

Result:

Setting up mysql-server-5.7 (5.7.11-0ubuntu5) ...
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' 
(using password: NO) while connecting to the MySQL server
Upgrade process encountered error and will not continue.

So it looks like it tried root@localhost again.

@Lars, the debian.cnf looks like this:

root@aspire-v3-771:/etc/mysql# cat debian.cnf 
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = root
password = 
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = root
password = 
socket   = /var/run/mysqld/mysqld.sock


I guess Postinst did not try to log in with debian-sys-maint and no password.

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

Title:
  package mysql-server-5.7  not installed  failed to install/upgrade:
  subprocess installed post-installation script returned error exit
  status 11

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

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

Reply via email to