I am trying to upgrade my packages on Ubuntu 14.04 , Then MySQL is asking me to choose the server's version that I want to receive , I am stuck there , can't select any option [Including none]

Tried to uninstall MySQL but the following error appears :

dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem

enter image description here

  • The dpkg advice you were given is worth trying. Proceed with it and see what happens next. If it doesn't work you can paste additional information here. – wie5Ooma Mar 6 '15 at 22:31
  • It opens the same stage (Choosing the version) ... It needs me to complete the upgrade – Abdelrahman Elkady Mar 6 '15 at 22:36
  • Just to be sure: if you press the tab key and/or the cursor keys then the red bar doesn't move? Because in the screenshot you've selected the first option and are about to accept it. – wie5Ooma Mar 6 '15 at 22:40
  • Yes it highlights the selection , however I can't confirm it with the OK – Abdelrahman Elkady Mar 6 '15 at 23:19
  • I did get that from your screenshot. I asked the question to try to establish if you can move the red bar. So can you? If 'yes' then you're not stuck. If 'no' then a more difficult operation is necessary. – wie5Ooma Mar 6 '15 at 23:24

Please try this first:

apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5

then reinstall mysql server.

If this doesn't work only then try the following:

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

or :

sudo apt-get remove --purge mysql*

followed by :

sudo apt-get autoremove
sudo apt-get autoclean

If you want to preserve the configuration files then omit the '--purge' part in the first line.

Then to reinstall:

sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation

warning: I never had to use the second method myself. Make a decent backup of your databases, if you have any, before trying this.

  • The problem is , it seems that I can't use apt right now , all the previous purge commands tells me the error dpkg was interrupted... , Running sudo dpkg --configure -a opens the same ' MySQL Upgrade window ' (that is in the screenshot) – Abdelrahman Elkady Mar 7 '15 at 3:43
  • Try the first command in the answer post please and if you think it doesn't work make a screenshot showing the output. The command is supposed to work always otherwise you wouldn't have an option to correct problems. – wie5Ooma Mar 7 '15 at 16:32
  • ok just a second try with sudo apt-get remove --purge mysql* worked today , Thanks man – Abdelrahman Elkady Mar 7 '15 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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