mysql-server failed to start after daily upgrade, reinstalling does not help

Bug #1001553 reported by Rehan Anis
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Mysql was working fine and /var/log/mysql/error.log does not shows any abnormal activity.
Since the last normal shutdown on 16th May, it cannot start.
the line

$sudo service mysql restart
stop: Unknown instance:
start: Job failed to start

I have followed the guide @
http://askubuntu.com/questions/125686/mysql-fails-to-start-after-upgrade-to-12-04

but to no avail.

also the reconfigure returns.

$ sudo dpkg-reconfigure mysql-server-5.5
/usr/sbin/dpkg-reconfigure: mysql-server-5.5 is broken or not fully installed

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mysql-server 5.5.22-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Sat May 19 13:00:57 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLConf.etc.mysql.my.cnf: Error: [Errno 2] No such file or directory: '/etc/mysql/my.cnf'
MySQLVarLibDirListing: False
PackageArchitecture: all
SourcePackage: mysql-5.5
UpgradeStatus: Upgraded to precise on 2012-04-02 (47 days ago)

Revision history for this message
Rehan Anis (anisrehan) wrote :
Revision history for this message
Rehan Anis (anisrehan) wrote :

Uninstall and reinstall results in following error

Package: mysql-server-5.5
Error: subprocess installed post-installation script returned error exit status 1

Package: mysql-server
Error: dependency problems - leaving unconfigured

Package: mysql-server-5.5
Error: subprocess installed post-installation script returned error exit status 1

Package: mysql-server
Error: dependency problems - leaving unconfigured

Revision history for this message
Rehan Anis (anisrehan) wrote :
Download full text (3.8 KiB)

Thats the console output

Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.22-0ubuntu1_i386.deb) ...
Selecting previously unselected package mysql-server-5.5.
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_i386.deb) ...
egrep: /etc/mysql/: No such file or directory
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.22-0ubuntu1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-client-5.5 (5.5.22-0ubuntu1) ...
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
120522 16:27:58 [Note] Plugin 'FEDERATED' is disabled.
120522 16:27:58 InnoDB: The InnoDB memory heap is disabled
120522 16:27:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120522 16:27:58 InnoDB: Compressed tables use zlib 1.2.3.4
120522 16:27:58 InnoDB: Initializing buffer pool, size = 128.0M
120522 16:27:58 InnoDB: Completed initialization of buffer pool
120522 16:27:58 InnoDB: highest supported file format is Barracuda.
120522 16:27:58 InnoDB: Waiting for the background threads to start
120522 16:27:59 InnoDB: 1.1.8 started; log sequence number 1589339
120522 16:27:59 InnoDB: Starting shutdown...
120522 16:27:59 InnoDB: Shutdown completed; log sequence number 1589339
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          E: Sub-process /usr/bin/dpkg returned an error code (1)

And thats the dpkg.log

2012-05-22 16:27:45 startup archives unpack
2012-05-22 16:27:45 install mysql-client-5.5 <none> 5.5.22-0ubuntu1
2012-05-22 16:27:45 status half-installed mysql-client-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:47 status triggers-pending man-db 2.6.1-2
2012-05-22 16:27:47 status half-installed mysql-client-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:47 status unpacked mysql-client-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:47 status unpacked mysql-client-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:47 install mysql-server-5.5 <none> 5.5.22-0ubuntu1
2012-05-22 16:27:47 status half-installed mysql-server-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:50 status half-installed mysql-server-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:50 status triggers-pending ureadahead 0.100.0-12
2012-05-22 16:27:50 status half-installed mysql-server-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:50 status triggers-pending ureadahead 0.100.0-12
2012-05-22 16:27:50 status unpacked mysql-server-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:50 status unpacked mysql-server-5.5 5.5.22-0ubuntu1
2012-05-22 16:27:51 install mysql-server <none> 5.5.22-0ubuntu1
2012-05-22 16:27:51 status half-installed mysql-serv...

Read more...

Revision history for this message
Rehan Anis (anisrehan) wrote :

This problem is resolved only after the following lines
aptitude purge mysql-server mysql-server-5.5 mysql-client mysql-client-5.5 mysql-common

removing mysql-common removed dozens of other packages, which I copied and now reinstalling.
after that I removed the mysql etc folder

sudo rm /etc/mysql/ -R

and reninstalled the mysql

sudo aptitude install mysql-server mysql-client

This resolves the problem, however the bug is there and should be sorted out.
JazakAllah

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Rehan Anis (anisrehan) wrote :

I can say that this problem occurs to those who had changed their mysql data dir.
After purging and reinstalling I came across another work around explained here

http://www.blog.webcare.pk/2012/05/ubuntu-mysql-cannot-start-after-upgrade.html

Revision history for this message
martin suchanek (martin-suc) wrote :

Thanks a lot to post it - I had the same problem -
Now I am going to spend couple of days to install/configure uninstalled applications ... .
I do not understand why developers still using the worst database on the world ? - so many applications dependent on it (I have been avoiding mysql for 15 years as a developer and I did the right thing.
(now I am fighting with chkconfig mysql on - which of course does not work - another story - another posts.)

Revision history for this message
Rehan Anis (anisrehan) wrote :

well, to avoid reconfiguring uninstalled packages, I use aptitude and tomboy/knotes
just ask sudo aptitude purge mysql-common
and it will display a list of packages needs to be removed, copy and paste them to notes.
then accept the solution.
After complete removal and reinstalling mysql
copy the list of apps from notes and write in console
sudo aptitude install [CTRL + SHIFT + V] [HIT ENTER]

that will save your couple of days... :D

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.