Ubuntu: dpkg: invoke-rc.d: initscript mysql, action “start” failed



Question:

I have read a number of the posts here and they all state to run the following commands:

  1. Apt-get -f remove **
  2. apt-get update
  3. apt-get upgrade
  4. apt-get -f install **

I have seen these in various order etc, and none are resolving, my issue. No matter what I try I get:

 apt-get -f install mysql-server                              Reading package   lists... Done  Building dependency tree  Reading state information... Done  The following extra packages will be installed:  mysql-server-5.5 mysql-server-core-5.5  Suggested packages:  tinyca mailx  The following NEW packages will be installed:  mysql-server mysql-server-5.5 mysql-server-core-5.5  0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.  Need to get 0 B/14.9 MB of archives.  After this operation, 53.0 MB of additional disk space will be used.  Do you want to continue [Y/n]? y  Preconfiguring packages ...  Selecting previously unselected package mysql-server-core-5.5.  (Reading database ... 83134 files and directories currently installed.)  Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.29-  0ubuntu0.12.04.1_amd64.deb) ...  Selecting previously unselected package mysql-server-5.5.  Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb)   ...  Selecting previously unselected package mysql-server.  Unpacking mysql-server (from .../mysql-server_5.5.29-0ubuntu0.12.04.1_all.deb) ...  Processing triggers for man-db ...  Processing triggers for ureadahead ...  Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...  Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...  invoke-rc.d: initscript mysql, action "start" failed.  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):  No apport report written because the error message indicates its a followup error from a   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  

I have tried several things over the past week and cannot get this to resolve, any assistance would be appreciated. I did notice the message:

Package mysql-server-5.5 is not configured yet.

and i have yet to get this configured so I am working on that aspect. Any other assistance will be very appreciated.


Solution:1

Solution from Titanicx worked for me. Ran

dpkg -S etc/mysql  

to see that mysql-common was the problem. Removed MySQL completely:

sudo apt-get remove --purge mysql-server mysql-client mysql-common  sudo apt-get autoremove  sudo apt-get autoclean  


Solution:2

I had this problem before. MySQL Daemon will be started just right after configuring the package, and if there is any errors in MySQL configuration or problems with accessing data directory, then the job will fail.

Checking MySQL error log on /var/log/mysql/error.log can help you in this case.

In my case, there was an access error caused by apparmor:

150131 19:38:23  InnoDB: Operating system error number 13 in a file operation.  InnoDB: The error means mysqld does not have the access rights to  InnoDB: the directory.  InnoDB: File name ./ibdata1  InnoDB: File operation call: 'open'.  InnoDB: Cannot continue operation.  

And it just solved by editing appropriate apparmor file.


Solution:3

My issue was that I had /tmp sym-linked elsewhere and Apparmor didn't like it.

Editing /etc/apparmor.d/abstractions/user-tmp and adding the real path to /tmp fixed it and allowed MySQL to start successfully.

(Source of inspiration)


Solution:4

If nothing at all helps try this one. I downloaded the deb package from the mysql site. then

sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5   sudo dpkg -i mysql-5.6.13-debian6.0-i686.deb   sudo apt-get install mysql-server   

Big thanks to Ingo.


Solution:5

For me it was very simple

apt-get autoremove  

Got:

Setting up mysql-server-5.5 (5.5.38-1~dotdeb.0) ...  update-rc.d: warning: /etc/init.d/mysql missing LSB information  update-rc.d: see <http://wiki.debian.org/LSBInitScripts>  mysql start/running, process 21373  


Solution:6

Seems like no need to do all these purges and removals. All you need to do is to remove the server, and execute:

rm /etc/mysql/ -R  

And then install the server.

The idea was from the external link referenced from the answer at this thread: https://askubuntu.com/a/448249/109764


Solution:7

Clean your os from all mysql install and add ppa from there https://launchpad.net/~ondrej/+archive/ubuntu/mysql-5.6


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »