I had spent a few hours on this with no resolution. Even with the mysql service running as root, it failed to get permissions to write to a data directory other than /var/lib/mysql (or whatever the default is if that's wrong). Even with apparmor configured to allow the new data directory, and even in complain mode, it still failed to read/write files in the new datadir or couldn't open a socket.
My fix was moving my data to the location; mounting a device to /var/lib/mysql. On Tue, Jun 21, 2016 at 11:43 AM, Mitch Claborn <1571...@bugs.launchpad.net> wrote: > Re: [Workaround Option 3/3] > > I tried this method, placing my local customizations in > /etc/mysql/mysql.conf.d/local.cnf but mysqld did not pick those up. I > had to name my file zzlocal.cnf. I'm guessing it reads those file in > alpha order, with the later files overriding the earlier. > > -- > You received this bug notification because you are subscribed to a > duplicate bug report (1573878). > https://bugs.launchpad.net/bugs/1571865 > > Title: > mysql fails to start after upgrade if previous defaults were > customised > > Status in Release Notes for Ubuntu: > Fix Released > Status in mysql-5.7 package in Ubuntu: > In Progress > Status in mysql-5.7 source package in Xenial: > Triaged > > 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-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). > > 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) > > To manage notifications about this bug go to: > https://bugs.launchpad.net/ubuntu-release-notes/+bug/1571865/+subscriptions > -- 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 ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs