mysql fails to start after upgrade if previous defaults were customised
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Release Notes for Ubuntu |
Fix Released
|
Undecided
|
Unassigned | ||
mysql-5.7 (Ubuntu) |
Fix Released
|
High
|
Lars Tangvald | ||
Xenial |
Fix Released
|
High
|
Robie Basak |
Bug Description
In 14.04 (both in 5.5 and 5.6), the default /etc/mysql/my.cnf shipped with options "key-buffer" and "myisam-recover". In 5.7, these option names have been removed and replaced with "key-buffer-size" and "myisam-
[Impact]
Server will fail to start, causing upgrade/
[Test case]
1. Install mysql-server in Ubuntu Trusty
2. Edit /etc/mysql/my.cnf and save it (can just add a comment)
3. Upgrade distro to Xenial
Expected behavior:
Server upgrades and starts normally
Actual behavior:
Server fails to upgrade, because it can't start, throwing an error about 'unknown option key_buffer'
[Regression Potential]
* If the sed command is faulty in some way it could mangle the options,
leading to the server not starting and installation failing
[Workarounds]
If your customisations were made in 15.04 or 15.10 and /etc/mysql/
1. Instead of editing /etc/mysql/
2. No need to run update-alternatives to remove use of /etc/mysql/
[Workaround Option 1/3]
To reset your MySQL configuration back to defaults, type "sudo update-alternatives --remove my.cnf /etc/mysql/
This option is not available if /etc/mysql/
[Workaround Option 2/3]
For a quick fix while retaining your existing customised configuration, edit the [mysqld] section /etc/mysql/
1. Replace "key_buffer" with "key_buffer_size". Note that there is a second occurrance of "key_buffer" under the [isamchk] section at the end of the file; changing this second occurrance is not necessary.
2. Replace "myisam-recover" with "myisam-
Then use "sudo service mysql start" to start the MySQL daemon again and "sudo apt-get -f install" to recover your system packaging state.
However, this workaround does not put you in the best place for future upgrades, since packaging will continue to not be able to perfectly update this file while preserving your modifications. Additionally there may be parts of your previously customised configuration that still will not work with MySQL 5.7.
To make future upgrades smoother in the future, consider following the next workaround option instead.
[Workaround Option 3/3]
Examine /etc/mysql/
Determine the changes you made to /etc/mysql/my.cnf. Taking only these changes and not the default contents of this file, add just your customisations into a new file at /etc/mysql/
Run: "sudo update-alternatives --remove my.cnf /etc/mysql/
Run: "sudo service mysql start" to start the MySQL daemon and "sudo apt-get -f install" to recover your system packaging state.
[Original Description]
Upgrading from 15.10 to 16.04 fails here
Not sure if this is related to a bug report already reported.
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.11-0ubuntu6
ProcVersionSign
Uname: Linux 3.19.0-30-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Mon Apr 18 18:13:33 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2014-04-18 (731 days ago)
InstallationMedia:
Logs.var.
MySQLConf.
MySQLConf.
[mysqld_safe]
syslog
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcCmdline: root=LABEL=DOROOT ro
RelatedPackageV
dpkg 1.18.4ubuntu1
apt 1.2.10ubuntu1
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.11-0ubuntu6 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2016-04-18 (0 days ago)
description: | updated |
summary: |
- package mysql-server-5.7 5.7.11-0ubuntu6 failed to install/upgrade: - subprocess installed post-installation script returned error exit status - 1 + mysql fails to start after upgrade if previous defaults were customised |
Changed in mysql-5.7 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
tags: | added: dist-upgrade |
Changed in ubuntu-release-notes: | |
status: | New → Fix Released |
Changed in mysql-5.7 (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in mysql-5.7 (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in mysql-5.7 (Ubuntu Xenial): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mysql-5.7 (Ubuntu): | |
assignee: | nobody → Lars Tangvald (lars-tangvald) |
Changed in mysql-5.7 (Ubuntu Xenial): | |
assignee: | nobody → Lars Tangvald (lars-tangvald) |
Changed in mysql-5.7 (Ubuntu): | |
status: | Triaged → In Progress |
Changed in mysql-5.7 (Ubuntu): | |
milestone: | none → ubuntu-16.05 |
Changed in mysql-5.7 (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in mysql-5.7 (Ubuntu Xenial): | |
status: | Triaged → In Progress |
assignee: | Lars Tangvald (lars-tangvald) → Robie Basak (racb) |
Changed in mysql-5.7 (Ubuntu Xenial): | |
milestone: | none → ubuntu-16.04.1 |
description: | updated |
description: | updated |
From log:
2016-04- 18T22:13: 30.875218Z 0 [Warning] System table 'plugin' is expected to be transactional. 18T22:13: 30.875411Z 0 [ERROR] Function 'innodb' already exists 18T22:13: 30.875459Z 0 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'. 18T22:13: 30.875477Z 0 [ERROR] Function 'federated' already exists 18T22:13: 30.875487Z 0 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'. 18T22:13: 30.875498Z 0 [ERROR] Function 'blackhole' already exists 18T22:13: 30.875506Z 0 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'. 18T22:13: 30.875517Z 0 [ERROR] Function 'archive' already exists 18T22:13: 30.875525Z 0 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'. 18T22:13: 30.876258Z 0 [ERROR] unknown variable 'key_buffer=16K' 18T22:13: 30.876347Z 0 [ERROR] Aborting
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-
2016-04-