mysql upgrade feisty to gutsy breaks

Bug #138714 reported by Heitzso
2
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: mysql-server

A couple of days ago I upgraded my laptop from feisty to gutsy. I had a feisty mysql server database on the laptop. The upgrade broke the database. Following different googled "how to fix this" from the internet just dug the problem in deeper. I'm going to have to do a full purge and reload to get mysql back up and running. The bogus "how to fix" notes on the web are not your problem, but mysql should have performed the steps necessary for an automated upgrde (I assume use original mysql to dump the db to a sql file ready to create and load a new db, then wiped the original db, finally with new mysql recreating and then loading a new db in the correct format for mysql 5.

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 138714] mysql upgrade feisty to gutsy breaks

Thanks for reporting this bug to help make Ubuntu better.

On Mon, Sep 10, 2007 at 06:04:51PM -0000, Heitzso wrote:

> A couple of days ago I upgraded my laptop from feisty to gutsy. I had a
> feisty mysql server database on the laptop.

From which version of the package were you upgrading ? The latest from
feisty ?

> The upgrade broke the
> database.

How did it break the database ? Which error messages did you get ?

 status incomplete
 importance medium

Changed in mysql-dfsg-5.0:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Heitzso (heitzso) wrote :

I was upgrading from current version of feisty (I update regularly) to gutsy via changing entries in /etc/apt/sources.list
and then 'apt-get update' followed by 'apt-get dist-upgrade'

MySql failed with a message re a bad hosts table.
I believe the 4.x to 5.x change in mysql modified several table layouts.

On the internet some recommendations were to just 'rm blat' a number of offending tables and let mysql rebuild them.
That partially worked, but also dropped the magical debian-maint@localhost (or something similar)
user record. I then followed internet recommendations for fixing that, but that failed as well. I was left
with something that complained about missing entries in some key tables when running
      mysqlcheck -A --auto-repair
I finally just apt-get remove'ed with purge, then reinstalled. It now works.

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 138714] Re: mysql upgrade feisty to gutsy breaks

On Tue, Sep 11, 2007 at 12:28:42AM -0000, Heitzso wrote:
> I was upgrading from current version of feisty (I update regularly) to gutsy via changing entries in /etc/apt/sources.list
> and then 'apt-get update' followed by 'apt-get dist-upgrade'
>
> MySql failed with a message re a bad hosts table.
> I believe the 4.x to 5.x change in mysql modified several table layouts.

Mysql-4.1 is no longer provided in feisty (it's a meta-package
installing mysql-5.0).

Could you have a look at /var/log/dpkg.log to see from which version you
were upgrading ?

Also /var/log/daemon.log should have more information about why mysql
has failed.

Revision history for this message
Heitzso (heitzso) wrote :
Download full text (17.7 KiB)

I apologize for my inaccurate assessment re 4.x to 5.x breaking mysql.

var log dpkg.log grepped for mysql and server over period of first update and problem:

dpkg.log:2007-09-06 14:03:03 upgrade mysql-server 5.0.38-0ubuntu1 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:03:03 status half-configured mysql-server 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:03 status unpacked mysql-server 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:03 status half-installed mysql-server 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:05 status half-installed mysql-server 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:05 status unpacked mysql-server 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:03:05 status unpacked mysql-server 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:03:15 upgrade mysql-server-5.0 5.0.38-0ubuntu1 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:03:15 status half-configured mysql-server-5.0 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:15 status unpacked mysql-server-5.0 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:15 status half-installed mysql-server-5.0 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:31 status half-installed mysql-server-5.0 5.0.38-0ubuntu1
dpkg.log:2007-09-06 14:03:32 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:03:34 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status unpacked mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 14:48:35 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 15:46:30 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 15:53:49 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 16:18:15 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 16:22:47 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 16:23:41 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 19:43:09 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 19:44:53 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-06 20:07:25 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-07 09:21:53 status half-configured mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-07 09:21:57 status installed mysql-server-5.0 5.0.45-1ubuntu2
dpkg.log:2007-09-07 09:21:58 status unpacked mysql-server 5.0.45-1ubuntu2
dpkg.log:2007-09-07 09:21:58 status half-configured mysql-server 5.0.45-1ubuntu2
dpkg.log:2007-09-07 09:21:58 status installed mysql-server 5.0.45-1ubuntu2

daemon.log grepped for mysql from next day when still trying...

Revision history for this message
Mathias Gug (mathiaz) wrote :

On Tue, Sep 11, 2007 at 01:13:42PM -0000, Heitzso wrote:
> I apologize for my inaccurate assessment re 4.x to 5.x breaking mysql.
>
> var log dpkg.log grepped for mysql and server over period of first
> update and problem:
>

Thanks for posting the logs. Could you also have a look at
/var/log/apt/term.log and search for the upgrade messages related to
mysql-server ?

Could you also post your configuration file ? (Make sure it doesn't
contain any password).

Revision history for this message
Heitzso (heitzso) wrote :

Let me know if you need any other information.

/var/log/apt/term.log excerpts follow:

Log started: 2007-09-06 13:57:54
(....)
Preparing to replace mysql-server 5.0.38-0ubuntu1 (using .../mysql-server_5.0.45-1ubuntu2_all.deb) ...
 * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
Unpacking replacement mysql-server ...
(...)
Preparing to replace mysql-server-5.0 5.0.38-0ubuntu1 (using .../mysql-server-5.0_5.0.45-1ubuntu2_i386.deb) ...
 * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
 * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
Unpacking replacement mysql-server-5.0 ...
(...)
Setting up mysql-server-5.0 (5.0.45-1ubuntu2) ...
Installing new version of config file /etc/mysql/debian-start ...
 * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
 * Starting MySQL database server mysqld ESC[80G ^MESC[74G[ESC[31mfailESC[39;49m]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
(...)
Errors were encountered while processing:
 mysql-server-5.0
 mysql-server
Log ended: 2007-09-06 15:45:34

Log started: 2007-09-06 15:46:29
Setting up mysql-server-5.0 (5.0.45-1ubuntu2) ...
 * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
 * Starting MySQL database server mysqld ESC[80G ^MESC[74G[ESC[31mfailESC[39;49m]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.0
 mysql-server
Log ended: 2007-09-06 15:46:49

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thanks for your help.

On Wed, Sep 12, 2007 at 12:53:39PM -0000, Heitzso wrote:
> * Stopping MySQL database server mysqld ESC[80G ^MESC[74G[ OK ]
> * Starting MySQL database server mysqld ESC[80G ^MESC[74G[ESC[31mfailESC[39;49m]

It seems that upgrade failed. We'd find more information in the
daemon.log file when the first upgrade happened.

Would you be able to reproduce the problem ? ie install an up-to-date
feisty server, load your data in your database and perform an upgrade to
gutsy ?

--
Mathias

Revision history for this message
Heitzso (heitzso) wrote :

Sorry, but not at the moment.

Revision history for this message
Emil Oppeln-Bronikowski (opi) wrote :

I can confirm that behavior. Here's my upgrade log:

Preparing to replace mysql-server-5.0 5.0.45-1ubuntu2 (using .../mysql-server-5.0_5.0.45-1ubuntu3_i386.deb) ...
 * Stopping MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.0.45-1ubuntu3_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
 * Stopping MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "stop" failed.
 * Starting MySQL database server mysqld [ OK ]
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

Revision history for this message
Emil Oppeln-Bronikowski (opi) wrote :

Man, scratch that! :( I've confused bugs #

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, this bug is a duplicate of bug 123427 and is being marked as such.

If you can reproduce the upgrade error, please reopen.

Changed in mysql-dfsg-5.0:
status: Incomplete → Triaged
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.