What are the steps to install MySQL 5.6 on Ubuntu 18.04 or 20.04 system?

I know that MySQL 5.6 version is not available in 18.04 and 20.04 apt repos. Any other way to install this particular version?

  • May I ask, why, exactly you want to do this? MySQL now has CHECK constraints, CTEs and window functions - all goodies you do not want to miss!
    – Vérace
    Apr 27, 2021 at 19:11
  • Are you serious, @Vérace? Are you under the impression that all production database servers are running the latest version of the database software, or that MySQL's new versions are backwards-compatible with old data? Oct 10, 2021 at 17:33

2 Answers 2


Finally found a way to install mysql 5.6 on ubuntu 18.04 / 20.04. We can install it via deb https://dev.mysql.com/doc/refman/5.6/en/linux-installation-debian.html


Answers left in comments:

If you are comfortable with Docker, that would be the fastest solution. You can spin up a container with MySQL 5.6 quite easily and not have to worry that an OS update will b0rk the SQL installation. - matigo

MySQL 5.6 is outdated and not longer supported. So you should think about if 5.7 or MariaDB would work for you as their are compatible in most cases. - nbk

You could use a source code install - it's quite easy if you carefully follow the instructions. - Vérace

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.