I have unsuccessfully been attempting to install mysql-server for a while on my ubuntu vps

During a fresh install (Fully purged all mysql related packages) partway through the installation it asks for the root password to be set after which it presents an error screen containing:

An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server.

Unpacking mysql-server (from .../mysql-server_5.5.34-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for man-db ...
Setting up libmysqlclient18 (5.5.34-0ubuntu0.12.04.1) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up mysql-client-core-5.5 (5.5.34-0ubuntu0.12.04.1) ...
Setting up mysql-client-5.5 (5.5.34-0ubuntu0.12.04.1) ...
Setting up mysql-server-core-5.5 (5.5.34-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.34-0ubuntu0.12.04.1) ...
131130 18:01:34 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
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
Processing triggers for libc-bin ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          ldconfig deferred processing now taking place
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have attempted a few fixes involving apparmor related stuff before I realised that apparmor is not mentioned in the error logs unlike alot of other people having similar issues.

Any help on this matter would be greatly appreciated.


Any attempts to continue or configure the installation after this point are simply met with further error messages

closed as off-topic by bain, Luis Alvarado Jul 24 '14 at 22:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – bain, Luis Alvarado
If this question can be reworded to fit the rules in the help center, please edit the question.

  • For your information: I HAD THIS PROBLEM AS WELL and have found the cause: Simply put, if you, like me, mapped your /tmp (or whatever mysql tmp-dir is mapped to, by default /tmp) on an incompatible partition (say, ntfs-3g or something else equally incompatible) you will have problems. This is not the only program that seems to have problems with the ntfs partition, even if it is able to hold all the same files, it can't hold some of the special file types (i think, sockets, pipes, devices, fall into that category), however, try moving your tmp back to an ext4 partition, that should fix it! :) – osirisgothra Jul 25 '14 at 22:26
  • I found the solution here : tutewall.com/package-mysql-server-5-5-is-not-configured-yet – Ek Kosmos Mar 26 '15 at 6:57

Try to purge all dependencies and re-install mysql-server.

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5.5
sudo apt-get install mysql-server
  • 4
    Warning: I'm pretty sure purge will delete your databases. Have a backup. – flickerfly Jun 13 '14 at 17:09
  • ALSO - doing that will force you to purge everything that depends on it (for my case, it was ALOT of things). Reinstalling all that is a bad problem too since depending on what the dependency is, you could lose even more than just the databases. It seems upgrading has the same problems (5.6) – osirisgothra Jul 25 '14 at 20:54
  • I ran into this today on Debian 7 after I tried to upgrade MySQL and apt choked on the "Keep original or install package maintainer version?" dialog. Purging fixed it, and did not delete my databases. – Link Swanson Feb 2 '16 at 15:34
  • 1
    @flickerfly I was almost certain it will delete my databases after "apt-get purge mysql*" but it didn't. Awesome! – L.S. Apr 23 '16 at 10:12

Open your terminal and type this

 sudo dpkg --configure mysql-server-5.5

it also mentioned that some dependencies issues are there

sudo apt-get install -f 

can help you to fix that issue.

  • 9
    sudo dpkg --configure mysql-server-5.5 returns: Setting up mysql-server-5.5 (5.5.34-0ubuntu0.12.04.1)... 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 – user216845 Dec 1 '13 at 5:54

Actually, the following bug report helped me a lot: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739846

The following commands should do the job:

echo "exit 0" >> /etc/init.d/mysql
dpkg --configure -a

However I had to configure it twice (the 2nd command).

  • dont see how that could possibly help... adding 'exit' at the end of the script like that, since the error return is '1' from within a nested part of the script, in the end it just does the same thing (i have the exact problem the question asker has) – osirisgothra Jul 25 '14 at 22:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.