Bug #79377 service start failed to create database if it doesn't exists(ubuntu1510)
Submitted: 23 Nov 2015 4:07 Modified: 17 Mar 2016 18:31
Reporter: Ramana Yeruva Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.7.10 OS:Any
Assigned to: CPU Architecture:Any

[23 Nov 2015 4:07] Ramana Yeruva
ubuntu1510 support has been added to apt repo from 5.6.28 and 5.7.10, while starting service when no contents there in /var/lib/mysql  it fails to create database

How to repeat:
clean environment and make sure that no mysql package installed and any other dependent 3rd party applications are installed
wget http://clustra.no.oracle.com/~bteam/my/apt-config-pkgs/qa/mysql-apt-config_0.5.3-1_all.deb
dpkg -i mysql-apt-config_0.5.3-1_all.deb<--select 5.7 in the version dialog
install mysql-server from apt repo(5.7.10)
make sure server started successfully with database populated correctly
service mysql stop
rm -rf /var/lib/mysql/*
rm -rf /var/lib/mysql/.mysql.conf.backup<--not sure why this file is created but any way removing hidden files too
service mysql start<--this should bring up server by creating database
now server is not able to come-up and service mysql start command is hanging

attaching detailed output below
[10 Mar 2016 13:03] Lars Tangvald
Posted by developer:
Found the cause. If /var/lib/mysql is empty the systemd service script will incorrectly add a file to it before running --initialize, which will then fail.
[17 Mar 2016 18:31] Paul DuBois
Noted in 5.7.13, 5.8.0 changelogs.

Database initialization failed during installation using Ubuntu 15.10