package mysql-server failed to install/upgrade: skip-bdb option not supported

Bug #444349 reported by Fabian Buch
368
This bug affects 78 people
Affects Status Importance Assigned to Milestone
MySQL Server
New
Undecided
Unassigned
mysql-dfsg-5.1 (Ubuntu)
Low
Mathias Gug

Bug Description

Binary package hint: mysql-server-5.1

Setting up mysql-server-5.1 (5.1.37-1ubuntu4) ...
 * Stopping MySQL database server mysqld [ OK ]
 * Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--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.1; however:
  Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured

ProblemType: Package
Architecture: i386
Date: Mon Oct 5 18:29:18 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 1
MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['mysql', 'debian-5.0.flag', 'ibdata1', 'ib_logfile0', 'ib_logfile1', 'mysql_upgrade_info', 'opcmsipe', 'opencmsipe', 'minos', 'aquamed_demo', 'debian-5.1.flag', 'scarab', 'minosyaml', 'ocmsyaml', 'redmine', 'minosmions', 'opencmsminos', 'minoserz', 'ocmserz', 'erzbistum_minos', 'erzbistum_opencms', 'redmine_development', 'ipeminos', 'ipeocms', 'redmine_test', 'minosipe', 'ocmsipe', 'minoss13', 'ocmss13', 'opencms', 'module_minos', 'opencms705', 'opencms705-news', 'aquamedtests', 'aquamed']
NonfreeKernelModules: nvidia
Package: mysql-server-5.1 5.1.37-1ubuntu4
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-11-generic i686

Revision history for this message
Fabian Buch (buch) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

Oct 6 09:59:20 asterios mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Oct 6 09:59:22 asterios mysqld: 091006 9:59:22 [Note] Plugin 'FEDERATED' is disabled.
Oct 6 09:59:22 asterios mysqld: /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
Oct 6 09:59:23 asterios mysqld: 091006 9:59:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 InnoDB: Started; log sequence number 0 247920102
Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] /usr/sbin/mysqld: unknown option '--skip-bdb'
Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] Aborting

Changed in mysql-dfsg-5.1 (Ubuntu):
importance: Undecided → Medium
Chuck Short (zulcss)
Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Triaged
importance: Medium → Low
Revision history for this message
Jonathan Harker (jonathanharker) wrote :

I have encountered this upgrading from Jaunty to Karmic. The dist-upgrade has stalled with 285 packages still to go, because when setting up mysql-server-5.1 (5.1.37-1ubuntu5) it attempts to restart the mysql service. MySQL now consistently fails at start (/etc/init.d/mysql start) as above, because it can't find the mysql.plugins table. MySQL helpfully suggests that I run mysql_upgrade, which fails because it cannot connect to the MySQL service that it expects to be up and running. The instructions at http://dev.mysql.com/doc/refman/5.1/en/mysql-upgrade.html don't work either, because mysql_check (et al.) also expect the MySQL service to be running.

Revision history for this message
Russell Hall (webtech) wrote :

I have the problem. upgrade from Jaunty to Karmic.. I am thinking that when I did my upgrade it was from 5.0 to 5.1.

I am also running 32bit.
in my /var/log/syslog I have these error messages.
Nov 3 13:57:52 webtech-office kernel: [ 8496.971043] type=1503 audit(1257274672.791:266): operation="open" pid=9128 parent=9127 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 3 13:57:52 webtech-office kernel: [ 8496.999592] type=1503 audit(1257274672.819:267): operation="open" pid=9137 parent=9136 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"

Revision history for this message
teamfighter (triplexx) wrote :

I have the same problem, mysql 5.1 won`t start after upgrade to Ubuntu 9.10 from 9.04

~$ sudo service mysql start
 * Starting MySQL database server mysqld [fail]

Revision history for this message
defaria (andrew-defaria) wrote :

Ack! How can this be rated as low?!? I need MySQL working to receive my email! Please fix this at once!

MySQL died for me too when going from 9.04 -> 9.10. Note I have no skip-kbk in my.cnf so no work around works for me.

Revision history for this message
Rabenschwinge (schattenkeil) wrote :

I had the same problem on a fresh MySQL installation on Karmic systems, a 32 bit system at work, and a 64 bit system at home.

Revision history for this message
Rabenschwinge (schattenkeil) wrote :

I suspect this has something to do with apparmor. Something important is forbidden. However, disabling the /usr/sbin/mysqld profile for apparmor has no effect, because the profile is reenabled and put to enforce mode on trying to reinstall.

Revision history for this message
Rabenschwinge (schattenkeil) wrote :

Ah, yes. There is a workaround. Open /etc/default/grub in an editor. Change the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
into:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=0"

reboot a normal kernel (don't pick a safe mode option). The type
sudo apt-get -f install

That should fix mysql. Now you can remove the line from your /etc/default/grub again, reboot and put mysql to complain mode. Since you utterly disable the security network this way you might wanna disable your network connection if the computer is directly connected to the Internet. Or at least shut down everything that isn't absolutely necessary.

Revision history for this message
Rabenschwinge (schattenkeil) wrote :

One more thing: You do need to run update-grub every time you change the /etc/default/grub for the changes to have effect.

Revision history for this message
Eric Speas (eric-speas) wrote :

Setting up mysql-server-5.1 (5.1.37-1ubuntu5) ...
 * Stopping MySQL database server mysqld [ OK ]
 * Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--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.1; however:
  Package mysql-server-5.1 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.
                          Errors were encountered while processing:
 mysql-server-5.1
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Night Eagle (nighteagle) wrote :

I added the following line to /etc/apparmor.d/usr.sbin.mysqld:

 /sys/devices/system/cpu/ r,

then reloaded apparmor profile and that fixed the problem for me.

Revision history for this message
Maik (mikyatope) wrote :

Same problem here with a fresh install of both ubuntu server karmic and mysql.

Night Eagle solution didn't work for me.

Revision history for this message
Radek Krahl (informatyka) wrote :

Try to add 'user=mysql' in [mysqld] section of /etc/mysql/my.cnf before doing 'apt-get install mysql-server'.

It worked for me. My problem was mysqld creating log files (/var/lib/mysql/[hostname]-bin.[number]) for innodb tables owned by root during the installation/upgrade. When started normally as mysql, mysqld didn't have permission to read/write these files. It looks like package installation script starts mysqld as root at first, and then as mysql.

Revision history for this message
Thomas M Wetherbee (tom-wetherbees) wrote :

I had this problem on a vanilla update from jaunty to karmic. Everything seemed to update okay, but later when I went to run a MySQL backup I couldn't do it. It was only then that I realized that karmic included an "upgrade" to MySQL 5.1. The upgrade had not completely worked.

I went in and tried reinstalling from Synaptic, and that's when I got this error. This caused me a lot of trouble. Not finding the exact cause of the error, I tried going back to 5.0, and ultimately purged MySQL and tried a fresh install. Even that didn't work. Of course purging caused many of my installed applications to be removed, so it's been an ongoing hassle.

The GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=0" work-around allowed me to install and configure MySQL 5.1. At this point things are looking good, although my testing has been very limited. I haven't looked at what went wrong with apparmor; perhaps someone here will explain it and save me the trouble.

This is the second update in a row that had some major failure for me (jaunty and karmic). I am a technical user, and I keep my systems in good order, so it is disappointing that we are seeing this sort of update trouble. I understand that upgrades are a major support hassle, but if we want common users to embrace Ubuntu we are going to need a smooth upgrade process. Perhaps the six month upgrade cycle is too aggressive?

Tom

Revision history for this message
Eduard Drenth (eduarddrenth) wrote :

In my case, I simlinked /usr/share to /home/share, I had to add

  /sys/devices/system/cpu/ r,
  /home/share/mysql/** r,

to /etc/apparmor.d/usr.sbin.mysqld

bye,

Eduard

Revision history for this message
default (dfa) wrote :

balticgame@ubuntu:~$ sudo service mysql start
mysql: unrecognized service
balticgame@ubuntu:~$

Revision history for this message
Vyacheslav S. (svm) wrote :

Please help me!

Today, after updating the mysql-server-5.1 in Ubuntu 9.10 - "Database Error: Unable to connect to the database: Could not connect to MySQL".
Why this update released?
How can I start the server now?
...
$ sudo service mysql start
 * Starting MySQL database server mysqld [fail]
...

Revision history for this message
Vyacheslav S. (svm) wrote :

syslog:

"...
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: Could not open required defaults file: /etc/mysql/debian.cnf
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: Fatal error in defaults handling. Program aborted
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]:
"

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 444349] Re: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

On Wed, Feb 10, 2010 at 04:55:29PM -0000, Vyacheslav Sudyarov wrote:
>
> "...
> Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
> Feb 10 22:52:37 svm-PC /etc/init.d/mysql[6309]: Could not open required defaults file: /etc/mysql/debian.cnf

Is there a /etc/mysql/debian.cnf file on the system?

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

Revision history for this message
Vyacheslav S. (svm) wrote : Re: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

>Is there a /etc/mysql/debian.cnf file on the system?
Yes

I solved the problem this way:
reinstalled mysql-server-5.1 and deleted old mysql-server packages.

Apparently today updating the mysql-server-5.1 poorly installed.

Revision history for this message
Tauren (tauren) wrote :

Is this really not a critical bug? Has anyone tried to install mysql-server immediately after a fresh install? Does it work?

I just installed 9.10 desktop 64 bit onto bare metal. Fresh install with no upgrade involved (reformatted drives that used to have an 8.04 system installed). I've installed maybe 5 or 10 packages, but haven't done any sort of manual file tweaking. The system is pretty much a fresh install.

I get the exact same problems as reported above, but none of the posted solutions are working for me.

I must have mysql installed for my application development and this is causing serious problems. What can I do to get mysql running? I'm about to download and install from source.

Thanks,
Tauren

Revision history for this message
Scimon (simon-proctor) wrote :

The most recent mysql 5.1 upgrade has caused this bug for the last few weeks now. I've reported it now as aaport popped up and I remembered my launchpad login.

I did try removing and reinstalling mysql but this didn't fix the issue, as it's my development box I'm not too bothered. I'll try some of the above ideas.

Revision history for this message
szu (szulat) wrote :

in my case the mysql server failed to start because of the outdated config file, removing "skip-bdb" from /etc/mysql/my.cnf solved the problem (this is because they removed berkeley db support in mysql)

the daemon.log attached to this bug shows the same as mine:
Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] /usr/sbin/mysqld: unknown option '--skip-bdb'
Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] Aborting

this might also apply to the other recently submitted mysqld bugs, but most of them do not show the deamon.log files so i can't tell for sure.

ideally, ubuntu install script should be intelligent and detect outdated keywords in config files and show a reasonable message instead of just "failed" :-)

Revision history for this message
Ron Addie (addie-usq) wrote :

I have experienced this for the last few months, each time mysql is upgraded. A workaround that works for me is:
1. stop apparmor [/etc/init.d/apparmor stop ]
2. stop mysql (probably not necessary) [ /etc/init.d/mysql stop ]
3. start mysql [ /etc/init.d/mysql start ]
4. start apparmor [/etc/init.d/apparmor start ]

Mysql works fine now. I also have to do this every time I restart my computer. Fortunately that is not too often.

Revision history for this message
Eric Speas (eric-speas) wrote : Re: [Bug 444349] Re: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

szu,

Thanks. That seems to have fixed it for me.

Eric

On Fri, Feb 26, 2010 at 3:51 PM, szu <email address hidden> wrote:

> in my case the mysql server failed to start because of the outdated
> config file, removing "skip-bdb" from /etc/mysql/my.cnf solved the
> problem (this is because they removed berkeley db support in mysql)
>
> the daemon.log attached to this bug shows the same as mine:
> Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] /usr/sbin/mysqld:
> unknown option '--skip-bdb'
> Oct 6 09:59:30 asterios mysqld: 091006 9:59:30 [ERROR] Aborting
>
> this might also apply to the other recently submitted mysqld bugs, but
> most of them do not show the deamon.log files so i can't tell for sure.
>
> ideally, ubuntu install script should be intelligent and detect outdated
> keywords in config files and show a reasonable message instead of just
> "failed" :-)
>
> --
> package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade:
> subprocess installed post-installation script returned error exit status 1
> https://bugs.launchpad.net/bugs/444349
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Lost South of Nowhere, East of Eden, On the Waterfront, Far From the Madding
Crowd

Revision history for this message
Scimon (simon-proctor) wrote : Re: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Still happening. Tried the apparmor fix but that didn't help.

Then found the line about skip-bdb and removed that and it fixed it.

Revision history for this message
Tauren (tauren) wrote :

I tried the following, but neither solved my problem:

Post #24: Remove --skip-bdb. In my case, this setting isn't in /etc/mysql/my.cnf. I wasn't getting any errors related to bdb.

Post #25: Starting mysql while apparmor is off. Mysql still fails to start.

When I uninstall and reinstall mysql, the installation fails every time.

The workaround I used was to install VirtualBox with Ubuntu inside of it and mysql running in it. This means I don't have mysql running on my localhost and need to connect to an IP, but its working for now. Would sure like to get it running on my system though.

Tauren

Revision history for this message
Ben Vitale (bvitale3002) wrote :

I had the issue from the original description.

I was able to stop it manually using 'mysqladmin shutdown -u root -p ...' Then followed the instructions here:

http://mirzmaster.wordpress.com/2009/01/16/mysql-access-denied-for-user-debian-sys-maintlocalhost/

And after starting it again I was able to stop it successfully. Then I retried the upgrade from Update Manager and it worked. Up and running on 5.1.37.

Revision history for this message
Ben Vitale (bvitale3002) wrote :

Also to follow up on comment #29, after fixing the first issue, I still encountered this error, which I suspect may have been caused due to the initial upgrade failures:

  ERROR 1577 (HY000) at line 1: Cannot proceed because system tables used by Event Scheduler were found damaged at server start

And fixed it by forcing mysql_upgrade:

  sudo mysql_upgrade --force -u root -p

And a restart of mysql.

Mathias Gug (mathiaz)
summary: package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 1
+ skip-bdb option not supported
summary: - package mysql-server-5.1 5.1.37-1ubuntu4 failed to install/upgrade:
- skip-bdb option not supported
+ package mysql-server failed to install/upgrade: skip-bdb option not
+ supported
Changed in mysql-dfsg-5.1 (Ubuntu):
assignee: nobody → Mathias Gug (mathiaz)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-dfsg-5.1 - 5.1.41-3ubuntu10

---------------
mysql-dfsg-5.1 (5.1.41-3ubuntu10) lucid; urgency=low

  [ Mathias Gug ]
  * Ship mysqld_safe script (LP: #552053).
  * debian/control: Use database for the package section (LP: #498939).
  * debian/mysql-server-5.1.templates: fix MySQL Cluster package name to
    mention mysql-cluster-server (LP: #394515).
  * debian/mysql-common.preinst: delete skip-bdb option if upgrading from 5.0
    since 5.1 fails to start if skip-bdb is in the configuration file.
    (LP: #444349).

  [ Steve Langasek ]
  * un-fuzzy the translations, which were only fuzzied due to a changed
    package name.
 -- Steve Langasek <email address hidden> Wed, 31 Mar 2010 20:27:39 -0700

Changed in mysql-dfsg-5.1 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Fennell (fenn-alum) wrote :

I found the fix mentioned here

> removing "skip-bdb" from /etc/mysql/my.cnf solved the problem

For Ubuntu Karmic Koala upgrade from mysql 5.0 to mysql 5.1 (mysql-server-5.1 5.1.37-1ubuntu5.1)

was what I needed. The apparmor stuff was a red herring (false clue) for me.

Revision history for this message
Eric (eric-bootz) wrote :

During a Dist upgrade Debian etch to Debian squeeze, I lost network connectivity and power to the server ?*?sweating?*?

Thanks for this fix, here's what I had to do:

Post #24: Remove --skip-bdb ...(because the question to ask if you want to keep the old file is the default)

and..
mysql_upgrade --force -u root -p

And a restart of mysql.

whoa!

now to fix all the other broken packages,

Thanks again!

Revision history for this message
Eric Speas (eric-speas) wrote : FW:12/25/2014 8:47:18 AM x
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers