I'm on Debian 8 (stable) (Linux zenbook 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux) and tried to apt-get update && apt-get upgrade yesterday. There was an upgrade for mysql-server-5.5 to 5.5.44-0+deb8u1, with which apt-get is having problems since then. The program hangs on Setting up mysql-server-5.5.

I then tried to purge the package and install it again, but with the same result. I don't know what else I can try. Suggestions?

$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,088 kB of archives.
After this operation, 32.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 308703 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.44-0+deb8u1_amd64.deb ...
Unpacking mysql-server-5.5 (5.5.44-0+deb8u1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.44-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.44-0+deb8u1) ...
Processing triggers for systemd (215-17+deb8u1) ...
Processing triggers for man-db ( ...
Setting up mysql-server-5.5 (5.5.44-0+deb8u1) ...
  • 1
    This problem was resolved by waiting for over half an hour to let apt-get do ... something.
    – user37050
    Commented Aug 12, 2015 at 18:46
  • My issue was that another instance of mysql was running and using the same port that the newly updated mysql was trying to use while starting as part of the setting up step. I had to end the running mysql manually and then apt-get proceeded. Commented Oct 30, 2015 at 18:47
  • @camil steps I just had the exact same issue. Disk and cpu appeared to be doing nothing but after just sitting on it for several minutes it "worked". Commented Nov 2, 2015 at 11:03

2 Answers 2


This was very odd. Two hours ago I left my computer with apt-get still running. I just came back to see that setting up had finally finished. Before, I had waited maybe 15-30 minutes, so this is certainly not normal. But now I can purge the package and reinstall it within seconds.

So, the solution to this seems to simply be "wait". It works itself out in the end.

  • Thank you, had the same issue with a Debian Stretch MSSQL-Server update hanging on "preparing to unpack" but wisely followed your advice and waited for over an hour. All OK now.. Commented Sep 10, 2019 at 18:41

There's a bug "Unable to install mysql-server, apt-get stuck at "Setting up"..

Please refer to the above link for solution, and see if it helps you, though it was on a diff version

  • That indeed looked the same, but my issue has been magically resolved without it. Thanks though.
    – user37050
    Commented Aug 9, 2015 at 16:03

You must log in to answer this question.