← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1574782] Re: mysql-server-5.7.postinst fails on upgrade if the datadir has been changed from default

 

This bug was fixed in the package mysql-5.7 - 5.7.17-0ubuntu0.16.04.2

---------------
mysql-5.7 (5.7.17-0ubuntu0.16.04.2) xenial; urgency=medium

  * Add libjson-perl dependency for test suite (LP: #1631338)
    The last two python tests in the mtr suite were rewritten
    in perl, and require this package. Added for mysql-testsuite
    and as a build-dep.
  * Build with DWITH_LZ4=system (LP: #1631339)
    Package was previously built with bundled liblz4, though it
    was specified as a build-dep.
  * Add support for custom datadir to systemd service (LP: #1574782)
    The service was reporting an error if no database could be found in
    /var/lib/mysql. It now checks the location specified in the config.
    Note that user must still handle apparmor access for custom datadir.
  * Fix copy of soft-link datadir to /var/lib/mysql-upgrade (LP: #1474212)
    Upgrade would sometimes fail if mysql-upgrade already contained a
    link copy from a previous upgrade.
  * Escape special characters in password (LP: #1598992)
    Special characters in the root password would cause syntax errors
    and postinst failures.
  * Failing tests on platforms supported by upstream fail build (LP: #1646488)
    A passing test suite is now enforced on i386 and amd64 platforms at
    build-time.
  * d/copyright: Updated with information about new source files
  * Unstable test main.xa_prepared_binlog_off disabled pending upstream fix.
    Upstream bug report: http://bugs.mysql.com/bug.php?id=83340
  * d/lintian-overrides: Updated line numbers

 -- Lars Tangvald <lars.tangvald@xxxxxxxxxx>  Fri, 03 Feb 2017 08:53:04
+0100

** Changed in: mysql-5.7 (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

** Bug watch added: MySQL Bug System #83340
   http://bugs.mysql.com/bug.php?id=83340

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1574782

Title:
  mysql-server-5.7.postinst fails on upgrade if the datadir has been
  changed from default

Status in mysql-5.7 package in Ubuntu:
  Fix Released
Status in mysql-5.7 source package in Xenial:
  Fix Released

Bug description:
  The systemd service script for MySQL will report an error if it
  doesn't find a database in the default datadir, /var/lib/mysql

  [Impact]
  For users with custom datadir, this means they have to keep the default database in /var/lib/mysql as well, or the systemd service will refuse to start.

  We change the systemd service script to check that a database exists
  in the directory found in the config, rather than the default.

  [Test case]
  * Install the mysql-server package, then stop the service
  * Edit /etc/mysql/mysql.conf.d/mysqld.cnf and change datadir
  * Delete all contents of /var/lib/mysql/
  * Update apparmor profile to allow read/write access to new datadir
  * Make sure the custom datadir exists, and run mysqld --initialize
  * Try to start the service

  [Regression Potential]
  This change has been in Yakkety for some time (5.7.15-0ubuntu2).

  Should the commands to fetch the value from the config not work right,
  it could break the systemd script whether the user has a proper
  database or not.

  [Original description]
  mysql upgrade fails if datadir (mysqld.cnf) is not /var/lib/mysql

  ProblemType: Package
  DistroRelease: Ubuntu 16.04
  Package: mysql-server-5.7 5.7.12-0ubuntu1
  ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
  Uname: Linux 4.4.0-21-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2
  Architecture: amd64
  Date: Mon Apr 25 19:31:55 2016
  ErrorMessage: subprocess installed post-installation script returned error exit status 1
  InstallationDate: Installed on 2015-11-30 (146 days ago)
  InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
  Logs.var.log.daemon.log:

  MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
  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']
  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-21-generic root=UUID=402be1c6-5faf-4404-9598-4ec21d975aa8 ro quiet splash vt.handoff=7
  RelatedPackageVersions:
   dpkg 1.18.4ubuntu1
   apt  1.2.10ubuntu1
  SourcePackage: mysql-5.7
  Title: package mysql-server-5.7 5.7.12-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
  UpgradeStatus: Upgraded to xenial on 2016-04-22 (3 days ago)
  modified.conffile..etc.apparmor.d.usr.sbin.mysqld: [modified]
  modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
  mtime.conffile..etc.apparmor.d.usr.sbin.mysqld: 2016-04-24T12:43:49.748706
  mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2016-04-24T12:45:04.992172

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