package mysql-server-5.7 5.7.18-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Errors were encountered while processing:
mysql-server-5.7
mysql-server
N: Ignoring file '20auto-
E: Sub-process /usr/bin/dpkg returned an error code (1)
aeltaib@
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.18-
ProcVersionSign
Uname: Linux 4.8.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
Date: Wed May 31 14:30:34 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-05-30 (0 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
RelatedPackageV
dpkg 1.18.4ubuntu1.2
apt 1.2.20
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.18-
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
Hi,
the first one ...
N: Ignoring file '20auto- upgrades. ucf-dist' in directory '/etc/apt/ apt.conf. d/' as it has an invalid filename extension
... is an unrelated issue. In fact not so much an issue than a FYI message telling you that since the update this file is no more active, but still around if you want/need to retain anything.
The second one ... aeltaib- PC:~$ mysql -u root -p mysqld/ mysqld. sock' (2)
aeltaib@
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
... first seems to be bug 1670629, but that is about timing on upgrade.
But you report this connect after the upgrade.
On the upgrade itself the server fails to start, and due to that the upgrade is being considered failed. system/ mysql.service; enabled; vendor preset: enabled) /usr/share/ mysql/mysql- systemd- start post (code=exited, status=0/SUCCESS) /usr/sbin/ mysqld [0;1;31m( code=exited, status= 1/FAILURE) [0m /usr/share/ mysql/mysql- systemd- start pre (code=exited, status=0/SUCCESS)
From the log:
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/
Active: activating (auto-restart) (Result: exit-code) since Wed 2017-05-31 14:30:33 EET; 7ms ago
Process: 8758 ExecStartPost=
Process: 8757 ExecStart=
Process: 8750 ExecStartPre=
Main PID: 8757 (code=exited, status=1/FAILURE)
May 31 14:30:33 aeltaib-PC systemd[1]: [0;1;31mFailed to start MySQL Community Server.[0m service: Unit entered failed state.[0m service: Failed with result 'e...'.[0m
May 31 14:30:33 aeltaib-PC systemd[1]: [0;1;39mmysql.
May 31 14:30:33 aeltaib-PC systemd[1]: [0;1;39mmysql.
An extended look at a full systemctl status mysql might shed some extra light.
But mostly the last mysql start I think was crashed by (from the log): 31T12:30: 35.024009Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 31T12:30: 35.024015Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ? 31T12:30: 35.024029Z 0 [ERROR] Aborting
2017-05-
2017-05-
2017-05-
So is there anything running?
Questions: mysqld/ mysqld. sock? mysqld/ mysqld. sock which process owns it (lsof) and is that process running?
- What are the permissions of /var/run/
- Would it work if you run through sudo?
- if /var/run/
- output of "systemctl status mysql.service"
- is there a mysql running already?
- are the mysql configured ports un ise by something else?