mysqld fails to start after upgrade: performance_schema definition errors

Bug #1571764 reported by Roger Chui
102
This bug affects 21 people
Affects Status Importance Assigned to Milestone
MySQL Server
New
Undecided
Unassigned
mysql-5.7 (Ubuntu)
Triaged
High
Lars Tangvald

Bug Description

Upgrading from 14.04 to 16.04, installer reported this bug.

Just need to access the uploaded logs to see if the issue is the same as #1567884

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.11-0ubuntu6
ProcVersionSignature: Ubuntu 3.13.0-85.129-generic 3.13.11-ckt36
Uname: Linux 3.13.0-85-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Mon Apr 18 11:18:53 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
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: ['sys', 'auto.cnf', 'ibdata1', 'ibtmp1', 'ib_logfile0', 'mysql_upgrade_info', 'ib_logfile1', 'performance_schema', 'debian-5.5.flag', 'mysql', 'debian-5.7.flag']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-85-generic root=UUID=49345884-23c0-4734-b4aa-e82106f7c3c2 ro splash quiet vt.handoff=7
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)

Revision history for this message
Roger Chui (chui101) wrote :
Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
status: Incomplete → Opinion
Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
status: Opinion → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Changed in mysql-5.7 (Ubuntu):
importance: Undecided → High
Revision history for this message
Roger Chui (chui101) wrote :

I am unable to reproduce this error further.

This happened twice on separate VMs when upgrading to 16.04 from clean installs of 14.04.4.

It has stopped happening on further upgrade attempts, so I would tend to think that it has been fixed, maybe as a side effect of some other update?

Revision history for this message
Robie Basak (racb) wrote :

You reported version 5.7.11-0ubuntu6 and that hasn't changed. Let's mark this Incomplete until someone can give us a reproducer.

Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jean-Max Reymond (jmreymond-free) wrote :

Is your /var/lib/mysql a soft link ?
I have the bug #1474212 related to soft links

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

17:19 root@malenstwo:etc# dpkg --configure -a
Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ...
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_table_stats`' exists.
mysql_upgrade failed with exit status 5
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
17:20 root@malenstwo:etc# ll /var/log/|grep mysql$
drwxr-s--- 2 mysql adm 4096 Apr 22 06:41 mysql

Mysql 5.7 is working but unable to finish configuration.

Revision history for this message
Roger Chui (chui101) wrote :

Maybe there is something wrong with the mysql_update program, since Marcin got

mysql_upgrade: [ERROR] 1813: Tablespace '`mysql`.`innodb_table_stats`' exists.

and I got

mysql_upgrade: [ERROR] 1007: Can't create database 'performance_schema'; database exists

@Marcin does manually running mysql-upgrade work?

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

After removing /var/lib/mysql/mysql/innodb_table_stats.ibd I got:

00:18 root@malenstwo:~# mysql_upgrade
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1030: Got error 168 from storage engine

MySQL works and all services I have (which uses mysql) work too.

Revision history for this message
Robie Basak (racb) wrote :

I've found three other bug reports that follow this pattern. Duping them in.

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Confirmed
summary: - mysql upgrade fails when going from 5.5 to 5.7
+ mysqld fails to start after upgrade: performance_schema definition
+ errors
Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Triaged
Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
assignee: nobody → Lars Tangvald (lars-tangvald)
milestone: none → ubuntu-16.05
Revision history for this message
Caysho (caysho) wrote :

I get the following error:
mysql_upgrade: [ERROR] 1049: Unknown database 'performance_schema'

I am doing an upgrade from Mythbuntu 14.04 LTS to Mythbuntu 16.04 LTS and the error occurs very near the end of the upgrade.

When I ran
ubuntu-bug mysql
I get told the package is not installed

When I ran
ubuntu-bug mysql-server
I got directed to this bug.

Revision history for this message
Caysho (caysho) wrote :
Revision history for this message
Caysho (caysho) wrote :

Adding error logs in case they are useful.

Revision history for this message
Ben Kietzman (ben-kietzman) wrote :

I looked into the /var/log/mysql/error.log and saw a couple ERROR messages:

2016-05-11T16:44:29.464074Z 0 [ERROR] unknown variable 'key_buffer=16M'
2016-05-11T16:46:47.683724Z 0 [ERROR] unknown variable 'myisam-recover=BACKUP'

I removed the 'key_buffer=16M' and 'myisam-recover=BACKUP' entries from the /etc/mysql/my.cnf and /etc/mysql/mysql.conf.d/mysqld.cnf files.

Then I reran the 'dpkg --configure -a' command. It worked and finished the MySQL configuration.

Revision history for this message
Prafulkr (prafulkr) wrote : Re: [Bug 1571764] Re: mysqld fails to start after upgrade: performance_schema definition errors
Download full text (4.1 KiB)

Thanks Ben,

But I am not getting that error. BTW I fixed the issue. Thanks a lot

Sent with MailTrack
<https://mailtrack.io/install?source=signature&lang=en&<email address hidden>&idSignature=22>

Thank You,

*Warm Regards.Praful Kumar,Lead Engineer, SMPL*
*--------------------------------------------------------------------------------------------------------------------------------*

*Voice: 00-91-9987339333.Text : 00-91-9969734252.*
*Skype: prafulkr*
*Blogs: http://prafulkr.wordpress.com <http://prafulkr.wordpress.com/>
& ** http://prafulkr.
<http://prafulkr.wordpress.com/>in*
*--------------------------------------------------------------------------------------------------------------------------------*
*Notice:*
*The information contained in this email is confidential. If you are not
the intended recipient, you must not disclose or use the information in
this email in any way. If you received it in error, please tell us
immediately by return email and delete the document. We do not guarantee
the integrity of any e-mails or attached files and are not responsible for
any changes made to them by any other person.*

*The information contained in this e-mail message is intended only for the
use of the individual or entity to which it is addressed. If you are not
the intended recipient, you should return it to the sender immediately.
Please note that while we scan all e-mails for viruses we cannot guarantee
that any e-mail is virus-free and accept no liability for any damage caused
by any virus transmitted by this email.*

On Wed, May 11, 2016 at 10:45 PM, Ben Kietzman <email address hidden> wrote:

> I looked into the /var/log/mysql/error.log and saw a couple ERROR
> messages:
>
> 2016-05-11T16:44:29.464074Z 0 [ERROR] unknown variable 'key_buffer=16M'
> 2016-05-11T16:46:47.683724Z 0 [ERROR] unknown variable
> 'myisam-recover=BACKUP'
>
> I removed the 'key_buffer=16M' and 'myisam-recover=BACKUP' entries from
> the /etc/mysql/my.cnf and /etc/mysql/mysql.conf.d/mysqld.cnf files.
>
> Then I reran the 'dpkg --configure -a' command. It worked and finished
> the MySQL configuration.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1575088).
> https://bugs.launchpad.net/bugs/1571764
>
> Title:
> mysqld fails to start after upgrade: performance_schema definition
> errors
>
> Status in mysql-5.7 package in Ubuntu:
> Triaged
>
> Bug description:
> Upgrading from 14.04 to 16.04, installer reported this bug.
>
> Just need to access the uploaded logs to see if the issue is the same
> as #1567884
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: mysql-server-5.7 5.7.11-0ubuntu6
> ProcVersionSignature: Ubuntu 3.13.0-85.129-generic 3.13.11-ckt36
> Uname: Linux 3.13.0-85-generic x86_64
> ApportVersion: 2.20.1-0ubuntu2
> Architecture: amd64
> Date: Mon Apr 18 11:18:53 2016
> ErrorMessage: subprocess installed post-installation script returned
> error exit status 1
> 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....

Read more...

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

@ben-kietzman:

Those two options have been renamed to key_buffer_size and myisam_recover_options, so you could do that instead of removing them (since they were not set to the server default values of 8M and OFF).

Revision history for this message
shivaraj naidu (shivarajnaidu) wrote :

I got following error while installing updates on ubuntu 16.04
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
shivaraj naidu (shivarajnaidu) wrote :

I refer this answer http://askubuntu.com/questions/760724/16-04-upgrade-broke-mysql-server/762775#762775

Works for me..

disabled status is the reason...

If you enable and start mysql server with following commands

sudo systemctl enable mysql.service && sudo systemctl start mysql.service

Then upgrading works fine without any issue ... we had previously

Revision history for this message
Robie Basak (racb) wrote :

I believe that the root cause of this bug was actually bug 1577712 that we fixed in June (Yakkety) and July (Xenial, 16.04), so am marking this bug as a duplicate of that one. See bug 1577712 for details.

For others subscribed to this bug, or otherwise believe they're affected by this issue: I see many comments above that I think are clearly due to unrelated issues, so this bug is probably not the one you want.

Revision history for this message
Dac Chartrand (conner-bw) wrote :

@shivarajnaidu: Thanks for the tip!

`sudo systemctl enable mysql.service && sudo apt upgrade` worked for me.

Even though it works now, I would like to hightlight that I, like many users, disable mysql auto start. My computer is a desktop not a server. I expect to control over these kinds of app. I expect upgrade to work with mysql.service disabled.

Thanks.

Revision history for this message
Robie Basak (racb) wrote :

Upgrades failing when the service is disabled is bug 1592669, not this bug. If you are affected, please mark yourself as affected on that bug.

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.