I'm on Ubuntu 16.04 and I have MySQL 5.7 installed. I need to have 5.6 installed for a project I'm working on so I've tried deleting 5.7 and then using the official instructions but it keeps installing 5.7 instead of 5.6


I selected 5.6 when running sudo dpkg-reconfigure mysql-apt-config and then I run sudo apt-get install mysql-server but it immediately starts pulling down 5.7. I've run sudo apt-get update multiple times before and after.

If I run sudo apt-cache showpkg mysql-server I get the following (stuff removed for brevity):

5.7.13-0ubuntu0.16.04.2 - 
5.7.11-0ubuntu6 - 
5.6.32-1ubuntu16.04 -

Cool, so it looks like I can install 5.6.32 I guess? I try:

sudo apt-get install mysql-server=5.6.32

but then I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '5.6.32' for 'mysql-server' was not found

What am I doing wrong?

This seems like a generic Ubuntu question rather than a specific MySQL one, which is why I'm asking here.

  • 1
    FYI, GitHub-style fenced code blocks (```) don't work here.
    – edwinksl
    Aug 2, 2016 at 2:09
  • 1
    @edwinksl thanks, I'll not make that mistake again! Aug 2, 2016 at 3:10

1 Answer 1


Oh, it was another case of RTFM.

I needed to provide the full package name to make it work:

sudo apt-get install mysql-server=5.6.32-1ubuntu16.04
  • Was there a bit more to this? I get E: Version ‘5.6.32-1ubuntu16.04’ for ‘mysql-server’ was not found
    – dibs
    Aug 2, 2016 at 2:13
  • 2
    @dibs What is the output of your sudo apt-cache showpkg mysql-server? Aug 2, 2016 at 3:11
  • Use this answer with combination of @PeterEvjan's comment, then you'll be able to find the correct version names. Aug 26, 2020 at 13:28

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.