Public bug reported: 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-0ubuntu0.16.04.2 Candidate: 5.7.17-0ubuntu0.16.04.2 Version table: *** 5.7.17-0ubuntu0.16.04.2 500 500 http://Cluster_C.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 5.7.17-0ubuntu0.16.04.1 500 500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages 5.7.11-0ubuntu6 500 500 http://Cluster_C.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 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-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca The following NEW packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 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-message-perl (6.11-1) ... No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of mysql-server: 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-base-image-ubuntu-16 systemd[1]: Starting MySQL Community Server... Apr 21 06:46:27 cloudcentric-base-image-ubuntu-16 mysql-systemd-start[13362]: MySQL system database not found in /var/lib/mysql. Please run mysqld --initialize. Apr 21 06:46:27 cloudcentric-base-image-ubuntu-16 systemd[1]: mysql.service: Control process exited, code=exited status=1 Apr 21 06:46:27 cloudcentric-base-image-ubuntu-16 systemd[1]: Failed to start MySQL Community Server. Executing the suggested command shows this # mysqld --initialize 2017-04-21T06:53:53.584517Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-04-21T06:53:53.587467Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. 2017-04-21T06:53:53.587746Z 0 [ERROR] Aborting 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://bugs.mysql.com/bug.php?id=22615 These suggest to fix this issue with --ignore-db-dir=lost+found ** Affects: mysql-5.7 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1685136 Title: MySQL fresh install failes with ext4 data partition on Ubuntu 16.04 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1685136/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs