Today when I tried to install mysql in my raspberry pi 2, problems happen as shown below: enter image description here

I use the command apt-get install mysql-server python-mysqldb to install mysql. Does any one know how to solve this problem?

2 Answers 2


Run this:

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

The issue is with mysql-common. Once you have run these commands, installation should be smooth.

  • And if you need to take screenshots, use Scrot
    – BantuTech
    Apr 13, 2016 at 14:37

I usually try finding answers from Ubuntu, if not Debian, otherwise general Linux. May or may not help.


  • Please do consider including relevant parts in of the link in the answer itself to prevent link rot.
    – Bex
    Apr 13, 2016 at 16:40
  • Provide context for links Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. So, while link only answers are indeed undesired and a potential reason for deletion I think we'll give you the chance to improve the answer. Please feel free to edit.
    – Ghanima
    Apr 13, 2016 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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