I just wiped all mysql server completely, including databases, and tried
to install 5.7 in xenial but it still fails. I had to do quite a few
manual steps ... Details below.

First, the my.cnf file has the line

!includedir /etc/mysql/conf.d/

... but the dir /etc/mysql/conf.d/ does not exist. This should be
removed as it blocks the install!

Full steps (note that I'm wiping everything, including all databases!):


# apt-get purge mysql-server*
# rm -rf /etc/mysql /var/lib/mysql* /var/log/mysql*
# apt-get -V install mysql-server

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
   mysql-server-5.7 (5.7.11-0ubuntu5)
   mysql-server-core-5.7 (5.7.11-0ubuntu5)
Suggested packages:
   tinyca (0.7.5-6)
The following NEW packages will be installed:
   mysql-server (5.7.11-0ubuntu5)
   mysql-server-5.7 (5.7.11-0ubuntu5)
   mysql-server-core-5.7 (5.7.11-0ubuntu5)
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.1 MB of archives.
After this operation, 94.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Selecting previously unselected package mysql-server-core-5.7.
(Reading database ... 56768 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.7_5.7.11-0ubuntu5_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.11-0ubuntu5) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../mysql-server-5.7_5.7.11-0ubuntu5_amd64.deb ...
grep: /etc/mysql/: No such file or directory
Unpacking mysql-server-5.7 (5.7.11-0ubuntu5) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.11-0ubuntu5_all.deb ...
Unpacking mysql-server (5.7.11-0ubuntu5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up mysql-server-core-5.7 (5.7.11-0ubuntu5) ...
Setting up mysql-server-5.7 (5.7.11-0ubuntu5) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf 
(my.cnf) in auto mode
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.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
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 systemd (229-4ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

# systemctl status mysql.service

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: 
enabled)
   Active: inactive (dead) (Result: exit-code) since Tue 2016-04-12 19:57:53 
BST; 3min 1s ago
  Process: 19174 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre 
(code=exited, status=1/FAILURE)
 Main PID: 14227 (code=exited, status=0/SUCCESS)
Apr 12 19:57:53 lin systemd[1]: mysql.service: Control process exited, 
code=exited status=1
Apr 12 19:57:53 lin systemd[1]: Failed to start MySQL Community Server.
Apr 12 19:57:53 lin systemd[1]: mysql.service: Unit entered failed state.
Apr 12 19:57:53 lin systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 12 19:57:53 lin systemd[1]: mysql.service: Service hold-off time over, 
scheduling restart.
Apr 12 19:57:53 lin systemd[1]: Stopped MySQL Community Server.
Apr 12 19:57:53 lin systemd[1]: mysql.service: Start request repeated too 
quickly.
Apr 12 19:57:53 lin systemd[1]: Failed to start MySQL Community Server.

// Worthless log info!

# journalctl -xe
-- Unit mysql.service has begun starting up.
Apr 12 20:03:00 lin mysql-systemd-start[19459]: MySQL system database not 
found. Please run mysql_install_db tool.
Apr 12 20:03:00 lin systemd[1]: mysql.service: Control process exited, 
code=exited status=1
Apr 12 20:03:00 lin systemd[1]: Failed to start MySQL Community Server.

// Ok ...

# mysql_install_db
mysql_install_db: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such 
file or directory)
mysql_install_db: [ERROR] Fatal error in defaults handling. Program aborted!

// grrr, edited my.cnf and commented the line "!includedir
/etc/mysql/conf.d/"

# mysql_install_db
2016-04-12 20:05:49 [WARNING] mysql_install_db is deprecated. Please consider 
switching to mysqld --initialize
2016-04-12 20:05:49 [ERROR]   The data directory needs to be specified.

// grrr!

# mysqld --initialize
2016-04-12T19:06:02.223398Z 0 [Warning] TIMESTAMP with implicit DEFAULT value 
is deprecated. Please use --explicit_defaults_for_timestamp server option (see 
documentation for more details).
2016-04-12T19:06:02.229248Z 0 [ERROR] --initialize specified but the data 
directory has files in it. Aborting.
2016-04-12T19:06:02.229663Z 0 [ERROR] Aborting

// Christ!

# rm -rf /var/lib/mysql*
# apt-get install -f

// Finally!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567884

Title:
  package mysql-server-5.7 5.7.11-0ubuntu5 failed to install/upgrade:
  subprocess installed post-installation script returned error exit
  status 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1567884/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to