NO_AUTO_CREATE_USER removed in mysql-8, broke upgrade

Bug #1850998 reported by Flavio Pimenta Rocha
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

gjgg

ProblemType: Package
DistroRelease: Ubuntu 19.10
Package: mysql-server-8.0 8.0.17-0ubuntu2
ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
Uname: Linux 5.3.0-19-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.1
Architecture: amd64
Date: Fri Nov 1 23:24:51 2019
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2019-06-17 (137 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
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: ['ib_logfile0', 'ibdata1', 'sys', 'ib_logfile1', 'mysql_upgrade_info', 'auto.cnf', 'imovelnaplanta', 'ib_buffer_pool', 'phpmyadmin', 'dralmir', 'mysql', 'debian-5.7.flag', 'performance_schema', 'dralmir_032019', 'clinicadralmir']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.3.0-19-generic root=UUID=a032c2c0-9f1b-4fd6-b51a-3f5d9a94f509 ro quiet splash nomodeset vt.handoff=7
Python3Details: /usr/bin/python3.7, Python 3.7.5rc1, python3-minimal, 3.7.5-1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu2
 apt 1.9.4
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.17-0ubuntu2 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to eoan on 2019-11-02 (0 days ago)
modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2019-11-01T23:43:19.875782

Revision history for this message
Flavio Pimenta Rocha (flaviopr) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

This seems to be the error:
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
2019-11-02T02:24:50.952742Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2019-11-02T02:24:50.958476Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
2019-11-02T02:24:51.013521Z 0 [ERROR] [MY-010119] [Server] Aborting

NO_AUTO_CREATE_USER was removed from mysql 8:
https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-deprecations
"""
 The following features related to account management are removed:

    Using GRANT to create users. Instead, use CREATE USER. Following this practice makes the NO_AUTO_CREATE_USER SQL mode immaterial for GRANT statements, so it too is removed, and an error now is written to the server log when the presence of this value for the sql_mode option in the options file prevents mysqld from starting.
"""

You have it set in /etc/mysql/mysql.conf.d/mysqld.cnf:

sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Removing this option should allow your server to start again, and the upgrade to complete:
sudo apt update
sudo apt -f install

tags: added: server-triage-discuss
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-8.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

@lars, is this something that should be taken care of by the package during upgrades?

tags: removed: server-triage-discuss
summary: - package mysql-server-8.0 8.0.17-0ubuntu2 failed to install/upgrade:
- installed mysql-server-8.0 package post-installation script subprocess
- returned error exit status 1
+ NO_AUTO_CREATE_USER removed in mysql-8, broke upgrade
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The config option NO_AUTO_CREATE_USER is not part of the default config, and therefore won't be taken care of during the upgrade to mysql 8. You should remove it manually and then retry the installation with:

sudo apt update
sudo apt -f install

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Opinion
To post a comment you must log in.