Skip to main content
GrN.dk

Main navigation

  • Articles
  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

Install a Specific MySQL Version on Ubuntu Without Creating Upgrade Debt

By Greg Nowak. Last updated 2026-07-01.

Older versions of this task were often reduced to one command: sudo apt-get install mysql-server-5.6. That advice belongs to a different Ubuntu era. On a current Ubuntu or Debian server, the better question is not “what old package name do I type?” It is “which supported MySQL release series should this system run, and how do we keep that choice maintainable?”

That distinction matters for client sites, internal platforms, and agency-managed hosting. A database version affects vendor support, application compatibility, backup and restore planning, upgrade windows, and the amount of operational debt handed to the next person. If a brief still says “install MySQL 5.6,” treat it as a requirement to verify, not a command to copy.

Start with the release series, not the package name

On July 1, 2026, Oracle’s MySQL APT repository lists current tracks including MySQL 9.7 LTS, 8.4 LTS, Innovation, 8.0, and 5.7. Oracle’s release model separates Long-Term Support releases from Innovation releases. For most production business systems, an LTS release is the safer default because it is designed for a more predictable maintenance cycle. The Innovation track is useful when a team deliberately wants newer MySQL features and has the testing cadence to handle faster change.

In practical terms, many teams should start by checking whether 8.4 LTS or the current LTS line fits the application and hosting policy. Use 8.0, 5.7, or another older series only when a vendor, application, or migration plan genuinely requires it. If the requirement comes from an old deployment note, confirm it against the application’s current documentation before you build a server around it.

Need Likely choice Operational note
New production system with normal stability requirements Current MySQL LTS series Best starting point for predictable maintenance and vendor support.
Application certified only on an older MySQL series The certified series Document the constraint and add an upgrade review to the project plan.
Reproducing a staging or vendor issue exactly Exact package build Pin deliberately and keep package versions consistent across the MySQL set.
Request for MySQL 5.6 from an old runbook Migration or containment plan Do not hunt for random mirrors unless you have accepted the support risk.
Team wants newest MySQL features quickly Innovation release Use only with automated testing, rollback planning, and active maintenance.
A quick decision matrix for turning “install a specific version” into a maintainable server choice.

Use Oracle’s APT repository when you need Oracle MySQL

Ubuntu’s own repositories may provide a MySQL package, and some distributions default to MariaDB in related package flows. If the requirement is specifically Oracle MySQL, use Oracle’s MySQL APT repository intentionally. That repository uses the mysql-apt-config package to configure which MySQL products and release series APT should see.

The official flow is still compact:

sudo dpkg -i /path/to/mysql-apt-config_VERSION_all.deb
sudo apt-get update
sudo apt-get install mysql-server
systemctl status mysql

During mysql-apt-config setup, choose the MySQL server series you want. After that, apt-get install mysql-server follows the repository configuration. If you later need to change the selected series, reconfigure the repository package first and refresh metadata:

sudo dpkg-reconfigure mysql-apt-config
sudo apt-get update

Do this as a packaging decision, not a quick shell tweak. On a production host, take a backup, record the selected release series, and make sure your monitoring, backup jobs, and restore process still work after the change. If the server is managed for a client, include that choice in the handover notes so future upgrades are not a mystery.

When you need an exact build

Sometimes “specific version” really means an exact package build: matching staging, reproducing a bug, satisfying a vendor certification, or keeping a cluster aligned during a controlled rollout. APT supports installing a named package version, but you should inspect the repository first.

apt-cache policy mysql-community-server
apt-cache madison mysql-community-server
sudo apt-get install mysql-community-server=<version>

Debian’s APT tools support the package=version syntax. Use it carefully. MySQL is not one isolated package; server, client, common, core, and library packages may need to stay in step. If you pin one package and let the rest drift, you can create a fragile install that behaves differently from staging or breaks during the next maintenance window.

For managed environments, write down why the exact version exists, how long it should remain pinned, and what event will trigger a review. Version pinning without an exit plan is usually just deferred upgrade work.

Treat MySQL 5.6 as a legacy signal

If the request is still “install mysql-server-5.6,” pause before implementation. That package shortcut is not the modern path for a current Ubuntu or Debian server, and MySQL 5.6 is a legacy dependency. The useful options are usually to test the application against a supported MySQL series, isolate the old workload for a short-term business reason, or plan a staged migration.

This is where business context matters. A forced legacy database version can limit hosting options, complicate security reviews, and make routine server maintenance more expensive. For agencies, it can also turn a small deployment task into an inherited support liability. Before accepting the old version as fixed, ask what code, plugin, vendor, or data assumption actually requires it.

A safer implementation checklist

Before installing or changing MySQL on a live system, confirm the application’s supported MySQL versions, export or snapshot the data, record the current package list, and test the target release in a staging environment. After installation, check service status, confirm the server version, run application smoke tests, and verify backups with at least one restore path.

mysql --version
systemctl status mysql
apt-cache policy mysql-server mysql-community-server

The commands are simple. The judgement around them is where projects usually succeed or fail.

Bottom line

On modern Ubuntu or Debian, installing a specific MySQL version is mainly about selecting the right MySQL release series in Oracle’s APT repository, then installing and documenting it cleanly. Exact build installs are available when there is a real reason. Old MySQL 5.6 requests are better treated as discovery for a migration or containment plan.

If you need a practical version-selection, migration, or upgrade plan for a live MySQL environment, Greg can help scope the work before it becomes an urgent production problem. Talk to Greg about the project.

Related on GrN.dk

  • MariaDB 10.6 EOL: quiet CMS hosting debt needs a real upgrade plan before July 2026
  • NGINX 1.30 changed upstream connection reuse by default: what to check before you upgrade
  • Ubuntu Server Dashboards and Monitoring Tools: When to Use Cockpit, Monit, ISPConfig, or Landscape

Need help with this kind of work?

Get help with your MySQL upgrade plan Get in touch with Greg.

Sources

  • MySQL APT Repository
  • A Quick Guide to Using the MySQL APT Repository
  • MySQL Releases: Innovation and LTS
  • apt-get(8) Debian Manpages
  • apt-cache(8) Debian Manpages
Last modified
2026-07-01

Tags

  • mysql
  • Ubuntu
  • DevOps
  • Server Administration
  • Log in to post comments

Review Greg on Google

Greg Nowak Google Reviews

 

  • Google’s 2026 AI Search Guidance: SEO Still Counts, Reporting Changes
  • Drupal Wiki: Build a Knowledge Base People Can Actually Use
  • Mysqldump Encoding: Avoid Broken Characters in Database Exports
  • Drupal 8 Advanced Aggregation: Better Google PageSpeed Scores Without the Guesswork
  • ChatGPT apps need a permissions map before they touch company data
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.