MySQL 5.7 on Xenial ships w/mysqld.cnf that causes crash

Bug #1577096 reported by Tom
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Fix Released
Medium
Lars Tangvald

Bug Description

The mysqld.cnf file includes a commented out line for log_slow_queries = /var/log/mysql/mysql-slow.log

As it turns out, log_slow_queries was deprecated long ago and it now causes MySQL 5.7 to fail to start/restart if it exists. The current variable/option is slow_query_log_file. By including this deprecated variable/option, users are going to get failures to restart that are not even printed to the MySQL log file. I did not find ANY log of what happened, only that MySQL failed to start. I believe this justifies updating mysqld.cnf with the current option so other users don't go through the frustration that I just experienced.

For me, this is running on a clean install of Ubuntu 16.04 LTS with the default xenial package install for mysql (which is 5.7). I installed it via "apt-get install".

Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
assignee: nobody → Lars Tangvald (lars-tangvald)
milestone: none → ubuntu-16.06
importance: Undecided → Medium
Revision history for this message
Tom (web-l) wrote :

I should have been a bit more explicit in how to reproduce the problem, which is very easy. Simply un-comment the log_slow_queries like in the mysqld.cnf file and then "sudo service apache2 restart". That will return the error message, "Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details." For me, this is 100% reproducible using a the Xenial community image on Amazon AWS, installing nothing more than MySQL. Consequently I believe you should be able to test this locally in any environment.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Thanks for the report.
Simply restarting the mysql server after uncommenting this option will give the following in MySQL's error log:

2016-05-02T06:02:57.284632Z 0 [ERROR] unknown variable 'log_slow_queries=/var/log/mysql/mysql-slow.log'
2016-05-02T06:02:57.284648Z 0 [ERROR] Aborting

We'll go through the default config file and make sure there aren't any other old options like this.

Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.9 KiB)

This bug was fixed in the package mysql-5.7 - 5.7.13-0ubuntu1

---------------
mysql-5.7 (5.7.13-0ubuntu1) yakkety; urgency=medium

  * Ubuntu merge from Debian VCS 1cdae6c. Remaining changes:
    - Revert "Build with libmecab-dev" since libmecab-dev is in
      universe.
  * Drop changes:
    - mysql-server-5.7: depend on apparmor (>= 2.10) for Trusty upgrade
      path (all upgrade paths go through Xenial; in hindsight this
      should have been a Breaks anyway).
    - Upstreamed to Debian:
      + d/p/allowemptyport.patch: update corresponding test
      + postinst: ignore mysql_upgrade's exit status 2
      + Export my_make_scrambled_password
      + Client commands in postinst should ignore custom config
      + Enable setting password for existing database if it was empty
      + Quote $rootpw correctly
      + Add libnuma-dev, libaio-dev to libmysqld-dev deps
      + d/p/fix-man-page-links.patch: drop (fixed upstream)
      + Add d/NEWS

mysql-5.7 (5.7.13-1~exp1) UNRELEASED; urgency=medium

  [ Robie Basak ]
  * Import upstream version 5.7.13.
  * Drop d/libmysqlclient18.lintian-overrides as the problem is genuine
    and should not be hidden. This addresses #812812 in part, but does
    not close it.
  * AppArmor profile refactoring and updates for 5.7.
  * Rename apport hook from 5.6 to 5.7.
  * debian/watch file update to 5.7.
  * d/rules: replace 5.6 with 5.7.
  * Drop libmysqld-pic.
  * d/rules: use dh_install --list-missing.
  * d/rules: some dh_install excludes.
  * d/rules: drop large set of comments.
  * d/rules configure: switch to INSTALL_LAYOUT=DEB.
  * d/rules configure: build WITH_INNODB_MEMCACHED.
  * d/rules configure: build with supplied boost.
  * d/rules configure: build with BUILD_CONFIG=mysql_release.
  * d/rules configure: drop SYSTEM_TYPE=.
  * d/rules: chmod changes.
  * mysqld.conf: move to non-deprecated name.
  * Rename debian/*5.6* to 5.7.
  * Adjust installation debian/additions/mysql-systemd-start.
  * Drop d/mysql-client-5.7.examples.
  * Drop some lintian overrides.
  * d/control: switch to 5.7.
  * libmysqlclient soname bump.
  * Update manpage formatting lintian overrides.
  * Drop d/p/fix-mysqlhotcopy-test-failure.patch.
  * Drop d/p/spelling.patch.
  * Drop d/p/fix_standalone_tests.patch.
  * Drop d/p/disable_tests.patch.
  * Drop d/p/scripts__mysqld_safe.sh__signals.patch.
  * Update Hurd and kFreeBSD patches.
  * Add d/p/fix-mtr-search-paths.patch.
  * Non-functional (documentation) 5.6->5.7 substitutions.
  * Drop comment from .install files.
  * Apport hook: install under new name.
  * mysql-testsuite-5.7 installation adjustments for 5.7.
  * Binary installation tweaks.
  * d/p/mysql-test-run-paths: adjust test suite for generic binary
    paths.
  * Move testsuite binaries to testsuite package.
  * Build with libmecab-dev.
  * Manpage changes for 5.7.
  * dep8 tests: s/5.6/5.7/.
  * dep8 test: adjust exclude list.
  * dep8 test: adjust test runner path.
  * dep8 test: fix typo (non-functional).
  * d/mysql-server-5.7.dirs: clean syntax.
  * TODO: d/copyright: misc updates for 5.7.
  * d/copyright: boost.
  * Mark scripts executable.
  * Drop gawk build dependency.
  * Add new MySQL 5.7 build de...

Read more...

Changed in mysql-5.7 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Jon Barber (jon-packetship) wrote :

This is still present in 16.04 LTS - version 5.7.20-0ubuntu0.16.04.1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.