Configuring mysql-server-5.7 (5.7.11-0ubuntu6) …
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: error with
mysql-server-5.7 (--configure):apt-get remove返回相同的结果。
从15.10升级到16.04时会出现此错误
发布于 2016-05-12 01:12:18
对我来说完全一样:运行级警告和mysql_upgrade错误。
我猜是因为我禁用了mysql服务,启用它可以解决问题:
sudo systemctl enable mysql
发布于 2016-08-23 00:15:02
我刚刚遇到了这个问题,这里有一个非常类似的错误报告:https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1584287
在我的例子中,我将mysql.service设置为disabled,并且在这种情况下,mysql_upgrade脚本似乎无法启动服务器。我启用了该服务(不需要启动它),并重新运行了升级。工作后,我停止了服务,并再次禁用它。
我不确定还有什么原因会导致这种情况,但如果有人在禁用该服务的情况下遇到这种情况,只需启用它进行升级即可。
发布于 2016-04-23 08:44:46
手动删除MySQL服务器上的所有文件
https://stackoverflow.com/questions/36803762
复制相似问题