package mysql-server-5.5 5.5.22-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #973951 reported by manzur
482
This bug affects 104 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
High
Unassigned

Bug Description

i can not install it.
using ubuntu 12.04 beta 2
i you have a question please ask

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
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
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
Errors were encountered while processing:
 mysql-server-5.5

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: mysql-server-5.5 5.5.22-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic x86_64
NonfreeKernelModules: nvidia fglrx
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Wed Apr 4 22:54:44 2012
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['ib_logfile0', 'test', 'mysql', 'ib_logfile1', 'ibdata1', 'performance_schema', 'debian-5.5.flag']
SourcePackage: mysql-5.5
Title: package mysql-server-5.5 5.5.22-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
manzur (sl-solaris) wrote :
tags: removed: need-duplicate-check
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
Miloš Jakovljević (milos-sd) wrote :

I updated mysql-server, and now I can't use it. :( Please fix this bug as soon as possible.

Revision history for this message
Miloš Jakovljević (milos-sd) wrote :

The problem was lack of /etc/mysql/my.cnf (in my case) or a problem in that file.

Just put the content from next link in that file and do: sudo dpkg --reconfigure -a

http://paste.ubuntu.com/928346/

Revision history for this message
Francisco Zurita (f-j-zurita) wrote :

Same problem after 12.04 upgrade (can't start mysql)
The my.cnf proposed by Milos_SD (thanks) and reinstaling mysql-server-5.5 package solved it.

Revision history for this message
Miguel Gonzalez (miguel-3-gonzalez) wrote :

I've performed a cleanup after trying to install a new fresh 12.04 Ubuntu Server.

I followed your instructions (I think the my.cnf has been updated in the repos) but it's still not working:

root@s16224997:/var/cache/apt/archives# dpkg --configure -a
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
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
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

Any work around or fix?

Thanks

Miguel

Revision history for this message
Nicolas GAILLARD (ngaillard-vosges) wrote :

I confirm the words of Miguel Gonzalez. I myself have followed the instructions and it did not work.

Revision history for this message
Paul Gevers (paul-climbing) wrote :

Try forcing "initctl reload-configuration" and reinstall.

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 982303, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
Miguel Gonzalez (miguel-3-gonzalez) wrote :

The duplicate is wrong (as the owner has admitted) in the other bug.

When I said I followed the instructions I referred to the initctl reload-configuration

root@s16224997:~# initctl reload-configuration
root@s16224997:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up mysql-server-5.5 (5.5.22-0ubuntu1) ...
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.
                          Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I even followed instructions from https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/978995

and performed:

#touch /etc/apparmor.d/local/usr.sbin.mysqld

But it still doesn't work.

Why doesn't the maintainer roll back to a working version while fixes this issue? I can't install in a new server running precise the mysql-server package

Miguel

Revision history for this message
Dr. Christian Knebel (knebel) wrote :

My file /var/log/upstart/mysql.log contains the following error:

AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'

Does this help tos solve the problem?

Revision history for this message
Matthew Witt (matthewjwitt) wrote :

I was also having this problem but fixed it by copying the /etc/apparmor.d/tunables/proc file from a 10.04 machine because this file was missing in my 12.04 installation.

Revision history for this message
Theo Cushion (493pocbrcycmdw7yksonho-admin-d18ecat4t1b76tkfi3vttr) wrote :

I've got it working by restoring /etc/apparmor.d/tunables/proc

    $ sudo apt-get install --reinstall apparmor

Then editing /etc/mysql/my.cnf to comment this line:

    skip-bdb

Start mysql:

    $ sudo start mysql
    mysql start/running, process 19527

Revision history for this message
pcollaog (pcollaog) wrote :

The same problem here, install mysql-server on clean ubuntu.

Configurando libmysqlclient18 (5.5.22-0ubuntu1) ...
Configurando libdbd-mysql-perl (4.020-1build2) ...
Configurando mysql-client-core-5.5 (5.5.22-0ubuntu1) ...
Configurando mysql-client-5.5 (5.5.22-0ubuntu1) ...
Configurando mysql-server-core-5.5 (5.5.22-0ubuntu1) ...
Configurando mysql-server-5.5 (5.5.22-0ubuntu1) ...
120522 22:41:56 [Note] Plugin 'FEDERATED' is disabled.
120522 22:41:56 InnoDB: The InnoDB memory heap is disabled
120522 22:41:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120522 22:41:56 InnoDB: Compressed tables use zlib 1.2.3.4
/usr/sbin/mysqld: Can't create/write to file '/tmp/ibptuloR' (Errcode: 13)
120522 22:41:56 InnoDB: Error: unable to create temporary file; errno: 13
120522 22:41:56 [ERROR] Plugin 'InnoDB' init function returned error.
120522 22:41:56 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120522 22:41:56 [ERROR] Unknown/unsupported storage engine: InnoDB
120522 22:41:56 [ERROR] Aborting

120522 22:41:56 [Note] /usr/sbin/mysqld: Shutdown complete

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error al procesar mysql-server-5.5 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1

Any work arround?

Revision history for this message
pcollaog (pcollaog) wrote :

Resolved for me added +w to /tmp directory weird

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Using Theo's suggestion to reinstall apparmor, I was able to do a clean install of MySQL...

# Remove crash information
$ sudo rm /var/crash/*

# Remove previous mysql installation (you will lose your data!)
$ sudo apt-get --yes autoremove --purge mysql-server
$ sudo rm -rf /var/lib/mysql
$ rm -rf ~/.mysql
$ sudo rm -rf /etc/mysql

# Reinstall apparmor
$ sudo apt-get install --reinstall apparmor

# Install MySQL
$ sudo apt-get install mysql-server

If this works for others, we may be able to mark this bug as triaged, but I think there may be an issue (with apparmor?) that needs to be fixed.

Revision history for this message
thisbeme (r7g0-luke-h6ia) wrote :

I had the same problem, after trying most of these I found that this worked -
http://askubuntu.com/questions/134574/fixing-broken-myslq-server-package-after-upgrade-to-12-04

Revision history for this message
Andrew Gray (andytrombone) wrote :

I have a new installation of Ubuntu 12.04 and none of the solutions above worked.
I even tried 3 fresh installs of Ubuntu 3 to try and solve the problem.
Over to PostgreSQL I go I suppose...

Revision history for this message
Frank Wang (fw454) wrote :

sudo apt-get --yes autoremove --purge mysql-server-5.5
This will work.

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Sometimes I am able to reproduce this issue, and sometimes, MySQL installs perfectly.

The following steps seem to consistently install MySQL, but I can't be sure due to the sporadic nature of the problem...

First, I tried to remove MySQL...
$ sudo apt-get --yes autoremove --purge mysql-server
    The following packages will be REMOVED:
    mysql-server* mysql-server-5.5* mysql-server-core-5.5*

But there were a bunch of dependencies left over. So I specifically uninstalled mysql-client-5.5 to remove the dependencies...
$ sudo apt-get autoremove --purge mysql-client-5.5
    The following packages will be REMOVED:
        libdbd-mysql-perl* libmysqlclient18* mysql-client-5.5* mysql-client-core-5.5* mysql-common* mysql-server* mysql-server-5.5*
        mysql-workbench* mysql-workbench-data*

Then, I removed any files that may have been left...
$ sudo rm -rf /var/lib/mysql ~/.mysql /etc/mysql

Finally, I reinstalled MySQL...
$ sudo apt-get install mysql-server

I've tried the above steps quite a few times, and MySQL always uninstalls and installs without giving an error. (However, I'm not sure if that means anything. It seems that if you try enough times, it eventually installs fine.)

Revision history for this message
residentmoron (resident-moron) wrote :
Download full text (6.6 KiB)

Here is my console output on a fresh install of Ubuntu 12.04 dedicated server with 1and1

  libdbd-mysql-perl{a} libdbi-perl{a} libhtml-template-perl{a} libmysqlclient18{a} libnet-daemon-perl{a} libplrpc-perl{a} mysql-client-5.5{a}
  mysql-client-core-5.5{a} mysql-common{a} mysql-server mysql-server-5.5{a} mysql-server-core-5.5{a}
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.1 MB of archives. After unpacking 97.1 MB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-common all 5.5.22-0ubuntu1 [13.7 kB]
Get: 2 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libmysqlclient18 amd64 5.5.22-0ubuntu1 [946 kB]
Get: 3 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libnet-daemon-perl all 0.48-1 [43.1 kB]
Get: 4 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libplrpc-perl all 0.2020-2 [36.0 kB]
Get: 5 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libdbi-perl amd64 1.616-1build2 [849 kB]
Get: 6 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libdbd-mysql-perl amd64 4.020-1build2 [106 kB]
Get: 7 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-client-core-5.5 amd64 5.5.22-0ubuntu1 [1,926 kB]
Get: 8 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-client-5.5 amd64 5.5.22-0ubuntu1 [8,298 kB]
Get: 9 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-server-core-5.5 amd64 5.5.22-0ubuntu1 [6,022 kB]
Get: 10 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-server-5.5 amd64 5.5.22-0ubuntu1 [8,816 kB]
Get: 11 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main libhtml-template-perl all 2.10-1 [65.0 kB]
Get: 12 http://mirror.us.oneandone.net/ubuntu/ubuntu/ precise/main mysql-server all 5.5.22-0ubuntu1 [11.8 kB]
Fetched 27.1 MB in 2s (10.7 MB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 57680 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.22-0ubuntu1_all.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.48-1_all.deb) ...
Selecting previously unselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously unselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.616-1build2_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_amd64.deb) ...
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.22-0ubuntu1_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-cor...

Read more...

Revision history for this message
residentmoron (resident-moron) wrote :

I uninstalled everything related to mysql-server. Then, uninstalled apparmor. Reinstalled mysql-server via: apt-get install mysql-server and it worked! rebooted and it was still working.

tried to reinstall apparmor and got the following:

Setting up apparmor (2.7.102-0ubuntu3) ...
 * Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
AppArmor parser error for /etc/apparmor.d/sbin.dhclient in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
AppArmor parser error for /etc/apparmor.d/usr.sbin.tcpdump in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
                                                                                                                                                         [fail]
invoke-rc.d: initscript apparmor, action "start" failed.
 * Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
AppArmor parser error for /etc/apparmor.d/sbin.dhclient in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
AppArmor parser error for /etc/apparmor.d/usr.sbin.tcpdump in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
invoke-rc.d: initscript apparmor, action "reload" failed.

Revision history for this message
dgtlmoon (dgtlmoon) wrote :

same issue here, if i kill mysqld, upon doing an upgrade, it seems to restart mysqld

Preconfiguring packages ...
(Reading database ... 250650 files and directories currently installed.)
Preparing to replace mysql-server-5.5 5.5.22-0ubuntu1 (using .../mysql-server-5.5_5.5.24-0ubuntu0.12.04.1_amd64.deb) ...
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.24-0ubuntu0.12.04.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.24-0ubuntu0.12.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
dgtlmoon (dgtlmoon) wrote :

If you get the above situation, then your packages are stuck because the old pre-removal script is returning errorlevel 1
to get around this, place "exit 0" after the #!/bin/bash in /usr/sbin/invoke-rc.d

remove that hack after you upgrade!

Revision history for this message
paul (psue99) wrote :

When I try to install or re-insatll mysql, I get:

120614 23:36:02 InnoDB: 1.1.8 started; log sequence number 1595675
120614 23:36:02 [ERROR] /usr/sbin/mysqld: unknown variable 'log_slow_verbosity=query_plan'
120614 23:36:02 [ERROR] Aborting

120614 23:36:02 InnoDB: Starting shutdown...
120614 23:36:03 InnoDB: Shutdown completed; log sequence number 1595675
120614 23:36:03 [Note] /usr/sbin/mysqld: Shutdown complete

start: Job failed to start

Revision history for this message
paul (psue99) wrote :

After a few tries of purgung and re-installing, I now get:

init: mysql respawning too fast, stopped
init: mysql pre-start process (2401) terminated with status 1

WTF?!!

Revision history for this message
David M. Wheeler (general-y) wrote :

I built a new clean Ubuntu 12.04 LTS yesterday and had the install set up LAMP server. During the install, a text box displaying saying (to the effect) "Do you want to change the MySql root password?"

Of course I do....why, thank you for reminding me....so I did
I entered a strong password for the MySql root, and tabbed to the OK button, and pressed return

That package installed OK, but then I got an error that the next MySQL package could not install, because the MySQL root password was not the default. I clicked OK (because I know that I changed it), and went on my merry way...until....

The install failed, adn the entire install of Ubuntu could not continue because MySQL failed. I had to restart the install back a few steps, and resintalled the LAMP server. THis time I DID NOT SET ANY PASSWORDS, but left them blank. THe install SEEMD to complete just fine.

However, while Apache and PHP were installed, MySQL was not. So I tried to reinstall, and that is where I got this error about the install not able to complete. I tried several times purge and was unsuccessful....until....

After trying to purge mysql-server and mysql-client-5.5, I di the following:

Revision history for this message
David M. Wheeler (general-y) wrote :

<sorry previous post continued>
I purged, then did the following:
     sudo apt-get purge mysql*

I found that two packages had NOT been previously removed:
     mysql-client-core-5.5
     mysql-server-core-5.5

THEN, once I tried to reinstall, it installed fine.

I POSTULATE THE FOLLOWING:

Revision history for this message
David M. Wheeler (general-y) wrote :

<Gosh I hate TABS!>
I POSTULATE THE FOLLOWING:

1) The intial problem is the collection of a mySQL root password, for which other package installs DO NOT PROMPT FOR, and thus cannot properly install the package. Since 3 (three) different packages prompt for the password change, I believe that three packages need the mySQL root password to properly install.

2) Because the purge does not correctly remove the CORE for client and server, the original mySQL root password was NOT being properly cleared out, and thus causing the failure of the package install.

Perhaps, this can be the cause of someone UPGRADING that also has a password set somewhere in the mySQL configurations.

<Hope this helps>

BTW, with the full purge, I am now up and operating again. Thanks.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

"That package installed OK, but then I got an error that the next MySQL package could not install, because the MySQL root password was not the default. I clicked OK (because I know that I changed it), and went on my merry way...until...."

This is very confusing, can you provide more information on that?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Affected users, if you can please include /var/log/upstart/mysql.log and the output of 'sudo /usr/sbin/mysqld' that will help a lot with diagnosing why mysqld won't start. Thanks!

Changed in mysql-5.5 (Ubuntu):
importance: Undecided → High
Revision history for this message
David M. Wheeler (general-y) wrote :

@Clint
My apologies for the "cute" e-mail.

>>"That package installed OK, but then I got an error that the next MySQL package could not install, because the MySQL root >>password was not the default. I clicked OK (because I know that I changed it), and went on my merry way...until...."
>>
>>This is very confusing, can you provide more information on that?

Let me explain in a bit more detail:

I was installing a fresh Ubunutu 12.04 server, as I said in post #26
As part of that install, the scripts set up MySQL, and walk you through several package installs for MySQL elements.

The first MySQL package to be installed (that I noticed) warned me about not using a strong password for the MySQL root password. So I accepted the advice and modified the MySQL root password. That package accepted the new password and installed fine.

The problem occurs when the LAMP server installation script trys to install the NEXT MySQL package. That script is expecting that the MySQL password is still set to a default value (or not password at all, I'm not sure).

<NOW HERE IS THE MAIN POINT> This next package DOES NOT INSTALL because it does not know what the MySQL root password is, AND IT DOES NOT PROMPT THE USER TO ENTER IT </NOW HERE IS THE MAIN POINT>

I solved my problem by NOT CHANGINGE THE MYSQL ROOT PASSWORD DURING THE INSTALLATION PROCESS
After everything was installed and I had everything working just the way I wanted it,
Then (and only then) did I change the MySQL root password.

The BUG (I believe -- as I stated in post #28) is the installation scripts, not MySQL.

Hope this helps.

Revision history for this message
Alex Urbano (asgaroth-belem) wrote :

This is still not working for me on 12.04 64 bit. trying to install mysql-server-5.5 (5.5.28-0ubuntu0.12.04.3)

Revision history for this message
Kerem Hadımlı (keremhd) wrote :

With a clean install of 12.10, I had the same problem. Tried purging and re-installing for a few times, and also removing apparmor completely

I could resolve it by adding nonexistant my.cnf

Revision history for this message
rsteinmetz70112 (rob-steinmetznet) wrote :

I have just encountered this problem with 12.04 and have tried every "fix" I can find withour sucess.

I am collecting a lot of errors in the mysql error.log

130506 16:59:00 [ERROR] Incorrect definition of table mysql.proc: expected column 'comment' at position 15 to have type text, found type char(64).
ERROR: 1136 Column count doesn't match value count at row 1
130506 16:59:01 [ERROR] Aborting

Mysql suggests

"Due to these changes, the server requires that a new grant table, proxies_priv, be present in the mysql database. If you are upgrading to MySQL 5.5.7 from a previous MySQL release rather than performing a new installation, the server will find that this table is missing and exit during startup with the following message:
Table 'mysql.proxies_priv' doesn't exist

To create the proxies_priv table, start the server with the --skip-grant-tables option to cause it to skip the normal grant table checks, then run mysql_upgrade."

#mysql --skip-grant-tables

Appears to run but

#mysql_upgrade

Fails

Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

Revision history for this message
rsteinmetz70112 (rob-steinmetznet) wrote :

This weekend I upgraded another server with the same result as above. I was able to work around it by

#mv /var/lib/mysql /var/lib/mysql.orig
#mkdir /var/lib/mysql
#chmod /var/lib/mysql to match mysql.orig
#chown mysql:mysql /var/lib/mysql
#mv /var/lib/mysql.orig/mysql /var/lib/mysql/mysql
#start mysql

There is apparently some problem with one or more of the files in /var/lib/mysql.orig restarting mysql creats new one which work fine.

Once I did this I was able to move the old mysql tables in subdirectories of /var/lib/mysql with out any problems.

I hope this helps someone.

Revision history for this message
tobixen (tobixen) wrote :

I had similar problem, installing mysql-server fails because it won't start.

Eventually, I got it up and running after:

1) installing /etc/mysql/my.cnf

2) did this to /etc/init/mysql.conf:

- exec /usr/sbin/mysqld
+ exec sudo -u mysql /usr/sbin/mysqld

Revision history for this message
Sebastian Audet (smaudet) wrote :

Well, I had this issue too, looks like launchpad doesn't let me submit a bug.

My 'fix' is less of a fix, but here's my feedback:

'Ubuntu version: 12.04.2 LTS (Kubuntu)
Specific package version: 5.5.22-0ubuntu1
Expected behavior: Install should succeed, job should start
Actual behavior: Install does not succeed, job cannot start

There is an issue with the upstart script in /etc/init/mysql.conf. Please find attached my 'fixes'. Please note that these fixes contain extra notes, and are not considered patch material, e.g. I have commented out offending code, and I have commented out a function which needs to be included.

In summary:

Problem #1
mysqld_get_param does not exist. This must be included, or replaced with the line used in the file.

Problem #2
An assumption is made that the data dir exists on a seperate partition. If this is not the case, the upstart script will fail to launch.

Problem #3
Thanks to these issue, the mysql-server cannot be configured from the package manager, as the upstart job fails, causing the install to fail to succeed.

Result:
After I made the changes seen in the attached file, the problems went away. This file needs some polish however, including detecting whether or not the user has a seperate partition or not.'

my /etc/init/mysql.conf (there are/were multiple issues):

# MySQL Service

description "MySQL Server"
author "Mario Limonciello <email address hidden>"

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

env HOME=/etc/mysql
umask 007

# The default of 5 seconds is too low for mysql which needs to flush buffers
kill timeout 300

#mysqld_get_param() {
# /usr/sbin/mysqld --print-defaults \
# | tr " " "\n" \
# | grep -- "--$1" \
# | tail -n 1 \
# | cut -d= -f2
#}

pre-start script

    # priority can be overriden and "-s" adds output to stderr
    ERR_LOGGER="logger -p daemon.err -t /etc/init/mysql.conf -i"
    #Sanity checks
    [ -r $HOME/my.cnf ]
    [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
    /lib/init/apparmor-profile-load usr.sbin.mysqld
    # check for diskspace shortage
    datadir=`/usr/sbin/mysqld --print-defaults | tr " " "\n" | grep -- "--datadir" | tail -n 1 | cut -d= -f2`
# if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4<4096) }'; then
# echo "$0: ERROR: The partition with $datadir is too full!" >&2
# echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
# exit 1
# fi
end script

exec /usr/sbin/mysqld

post-start script
   for i in `seq 1 30` ; do
        /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && {
            exec "${HOME}"/debian-start
            # should not reach this line
            exit 2
        }
        statusnow=`status`
        if echo $statusnow | grep -q 'stop/' ; then
            exit 0
        elif echo $statusnow | grep -q 'respawn/' ; then
            exit 1
        fi
        sleep 1
    done
    exit 1
end script

Revision history for this message
Matthias Schroeder (n-ms) wrote :

@smaudet: great analyse,
To be sure, i verified first that mysqld_get_param is missing and after that commented out the lines from pre_start and mysql is operational again.

Thanks!

tags: added: saucy
Revision history for this message
David Skeen (davidlskeen) wrote :

I could not get the install to work by trying to simulate a clean install (rm of /var/lib/mysql, /var/log/mysql and /etc/mysql). After the install failed, I copied a /etc/mysql that had worked for me previously. At this point, I could start mysql and it works (although I still need to get it working as a service).

Earlier installs of MySQL 5.1 worked fine on my machine; I hit the problem when I tried a new install at the 5.5 version.

Revision history for this message
Juan Miguel (onebox) wrote :

Hello guys, I am not an Ubuntu User but I think I can help here, I got to this page because I had the same problem while installing the mysql-server-5.5 package, It seems my problem was solved by changing the my.cnf file at /etc/mysql/; all I did was change the line starting by

bind-address

what I did was just change the default IP for my actual IP and all the problems were solved. (Mine is static).

Hope it helps you.

cherno (gunmanche)
Changed in mysql-5.5 (Ubuntu):
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
druss (druss) wrote :

I got the same error during installation "[ERROR] /usr/sbin/mysqld: unknown variable 'log_slow_verbosity=query_plan'"
Then found solution. Just need to comment log_slow_verbosity=query_plan string in /etc/mysql/my.cf
Found here: http://druss.info/2015/01/fixed-error-usrsbinmysqld-unknown-variable-log_slow_verbosityquery_plan/

Revision history for this message
Morgan Tocker (morgo) wrote :

@druss: Log-slow-verbosity is a Percona Server feature. The behavior of mysql config options is that if they are unknown the server refuses to start. This is useful, since if the server were to start based on a typo in config, it could behave drastically different.

psydexx (psydexx1996)
Changed in mysql-5.5 (Ubuntu):
status: Confirmed → Fix Committed
no longer affects: mysql-5.5 (Ubuntu Linaro Evaluation Build)
Changed in mysql-5.5 (Ubuntu):
status: Fix Committed → Confirmed
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.