** Description changed:

  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-
  recover-options" instead. If a user customised /etc/mysql/my.cnf before,
  then the entire file is preserved, including the removed options,
  causing mysqld to fail to start after upgrade to 5.7 (eg. when upgrading
  to 16.04).
  
  [Impact]
  Server will fail to start, causing upgrade/installation of MySQL to fail.
  
  [Test case]
  1. Install mysql-server in Ubuntu Trusty
- 2. Edit /etc/mysql/my.cnf and change the value of key_buffer
+ 2. Edit /etc/mysql/my.cnf and save it (can just add a comment)
  3. Upgrade distro to Xenial
- 3. Verify that upgrade of MySQL succeeds
- 4. Verify that in /etc/mysql/my.cnf, key_buffer and myisam-recover are 
renamed, with a comment about why it was done
  
- Alternately, install mysql-server in Xenial/Yakkety, then remove it and
- change key_buffer_size and/or myisam_recover_options to key_buffer and 
myisam_recover in /etc/mysql/mysql.conf.d/mysqld.conf
+ 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, 
+ * 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/my.cnf.migrated does not exist, then the workarounds below
  are still essentially the same but with a couple of exceptions:
  
  1. Instead of editing /etc/mysql/my.cnf.migrated, edit the file you
  originally changed directly. This may be /etc/mysql/my.cnf (through the
  symlink), or a file you changed or added in either /etc/mysql/conf.d/ or
  /etc/mysql/mysql.conf.d/. The command "grep -Er
  'key.buffer|myisam.recover' /etc/mysql" may help you in locating this.
  
  2. No need to run update-alternatives to remove use of
  /etc/mysql/my.cnf.migrated.
  
  [Workaround Option 1/3]
  
  To reset your MySQL configuration back to defaults, type "sudo update-
  alternatives --remove my.cnf /etc/mysql/my.cnf.migrated" after the
  upgrade. Then use "sudo service mysql start" to start the MySQL daemon
  and "sudo apt-get -f install" to recover your system packaging state.
  
  This option is not available if /etc/mysql/my.cnf.migrated doesn't exist
  on your system, for example if your customisations were made on 15.04 or
  15.10.
  
  [Workaround Option 2/3]
  
  For a quick fix while retaining your existing customised configuration,
  edit the [mysqld] section /etc/mysql/my.cnf.migrated as follows. But see
  the caveats detailed below and consider Workaround Option 3/3 instead
  first.
  
  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-recover-options".
  
  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/my.cnf.migrated for the customisations you made
  previously. You can find an original version of /etc/mysql/my.cnf as
  shipped with 14.04 at: http://bazaar.launchpad.net/~ubuntu-
  branches/ubuntu/trusty/mysql-5.5/trusty/view/head:/debian/additions/my.cnf
  
  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/mysql.conf.d/local.cnf
  (preferred) and/or by editing /etc/mysql/mysql.conf.d/mysqld.cnf (to be
  avoided if possible) if necessary.
  
  Run: "sudo update-alternatives --remove my.cnf
  /etc/mysql/my.cnf.migrated" to switch to the new configuration scheme.
  
  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
  ProcVersionSignature: Ubuntu 3.19.0-30.34-generic 3.19.8-ckt6
  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.log.daemon.log:
  
  MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
  MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
   [mysqld_safe]
   syslog
  MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
   [mysqldump]
   quick
   quote-names
   max_allowed_packet   = 16M
  MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
   [mysqld_safe]
   syslog
  MySQLVarLibDirListing: ['debian-5.7.flag', 'debian-5.5.flag', 
'debian-5.6.flag', 'ib_logfile1', 'drupal8', 'servermail', 'ib_logfile0', 
'auto.cnf', 'risenlif_risenlife2', 'dynazu_wiki', 'performance_schema', 
'ibdata1', 'phpmyadmin', 'ib_buffer_pool', 'mysql_upgrade_info', 'parke_wiki', 
'tracker', 'mysql']
  ProcCmdline: root=LABEL=DOROOT ro
  RelatedPackageVersions:
   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)

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

Title:
  mysql fails to start after upgrade if previous defaults were
  customised

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/1571865/+subscriptions

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

Reply via email to