MySQL fresh install failes with ext4 data partition on Ubuntu 16.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
mysql-5.7 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Ubuntu Version:
# lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
MySQL Package Version:
# apt-cache policy mysql-server
mysql-server:
Installed: 5.7.17-
Candidate: 5.7.17-
Version table:
*** 5.7.17-
500 http://
100 /var/lib/
5.
500 http://
5.
500 http://
On a fresh Ubuntu 16.04 I tried to install mysql-server with an extra ext4 volume mounted at /var/lib/mysql, but the installation failed:
# apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libcgi-fast-perl libcgi-pm-perl libencode-
libio-html-perl liblwp-
Suggested packages:
libdata-dump-perl libipc-
The following NEW packages will be installed:
libaio1 libcgi-fast-perl libcgi-pm-perl libencode-
libio-html-perl liblwp-
0 upgraded, 21 newly installed, 0 to remove and 181 not upgraded.
Need to get 19.0 MB of archives.
After this operation, 162 MB of additional disk space will be used.
Do you want to continue? [Y/n]
...
Setting up libhttp-
No apport report written because the error message indicates its a followup error from a previous failure.
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Taking a look at /var/log/syslog, it suggests this:
Apr 21 06:46:27 cloudcentric-
Apr 21 06:46:27 cloudcentric-
Apr 21 06:46:27 cloudcentric-
Apr 21 06:46:27 cloudcentric-
Executing the suggested command shows this
# mysqld --initialize
2017-04-
2017-04-
2017-04-
At this time the only files in /var/lib/mysql are:
# ll /var/lib/mysql
total 24
drwx------ 3 mysql mysql 4096 Apr 21 06:46 ./
drwxr-xr-x 46 root root 4096 Apr 21 06:46 ../
-rw-r--r-- 1 root root 0 Apr 21 06:46 debian-5.7.flag
drwx------ 2 mysql mysql 16384 Apr 21 06:44 lost+found/
Removing debian-5.7.flag doesn't change anything.
Removing everything from the directory works. mysqld --initialize finishes without error. Removing the mysql packages and executing apt install mysql-server again on an empty /var/lib/mysql works fine.
Searching the web, their are already bug reports present, like:
https:/
These suggest to fix this issue with --ignore-
Thank you for your report and your help to make Ubuntu better.
I was liking in the related upstream bug as task above to get better visibility of its status.
On the upstream issue discussions reopened around the question if mysql has to provide updated start scripts or if the packages shall add the --ignore-db-dir on their own.
Never the less I think that is a valid issue, but I'd leave the final triage to Lars/Robie that I will subscribe now.