package mysql-server-5.7 5.7.21-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 - nonstandard location
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Modified the file
vi /etc/apparmor.
# Or if mysql databases are stored in /home:
alias /var/lib/mysql/ to an exist folder
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.21-
ProcVersionSign
Uname: Linux 4.13.0-32-generic i686
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: i386
Date: Sat Feb 10 18:51:28 2018
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2018-02-07 (2 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release i386 (20170801)
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.3
apt 1.2.24
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.21-
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
Yeah it fails to (re)start in your case.
From your mysql log: 10T17:30: 08.421243Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation. 10T17:30: 08.421273Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. 10T17:30: 08.421297Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation. 10T17:30: 08.421319Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. 10T17:30: 08.421340Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1' 10T17:30: 08.421364Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_ data_file_ path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data! 10T17:30: 08.421389Z 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
2018-02-
2018-02-
2018-02-
2018-02-
2018-02-
2018-02-
2018-02-
And very very likely related to that apparmor denies: 0.859:38) : apparmor="DENIED" operation="mknod" profile= "/usr/sbin/ mysqld" name="/ db/mysql/ N200.lower- test" pid=16095 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=125 ouid=125 1.047:39) : apparmor="DENIED" operation="mknod" profile= "/usr/sbin/ mysqld" name="/ db/mysql/ N200.lower- test" pid=16095 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=125 ouid=125 1.047:40) : apparmor="DENIED" operation="mknod" profile= "/usr/sbin/ mysqld" name="/ db/mysql/ N200.lower- test" pid=16095 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=125 ouid=125
[17112.114807] audit: type=1400 audit(151828213
[17112.303168] audit: type=1400 audit(151828213
[17112.303241] audit: type=1400 audit(151828213
So your alias file /etc/apparmor. d/tunables/ alias should maybe look like:
alias /var/lib/mysql/ -> /db/mysql/,
It isn't attached, is that your content?