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

 

Illustrated infographic summarizing: OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
OpenAI Presence Arrived—But Is Your Workflow Ready for an Agent?
2026-07-22

Before an AI agent can take on real work, its workflow needs clear scope, permissions, handoffs, evaluation cases, and production monitoring.

Illustrated infographic summarizing: Chatbot Transcripts Quietly Became a Retention and Redaction Problem
Chatbot Transcripts Quietly Became a Retention and Redaction Problem
2026-07-21

Chatbot transcripts spread across providers, logs and support tools. Here is how to map each copy, redact sensitive data and test deletion properly.

Illustrated infographic summarizing: Cloudflare Service Keys Stop in September: Find Every Caller
Cloudflare Service Keys Stop in September: Find Every Caller
2026-07-20

Cloudflare Service Keys stop working on September 30, 2026. Here is how to find every caller, move to scoped API tokens and avoid a late outage.

Illustrated infographic summarizing: Your AI Workflow Needs an Acceptance Test Before It Meets Customers
Your AI Workflow Needs an Acceptance Test Before It Meets Customers
2026-07-19

A practical way to test AI workflows using realistic scenarios, tool checks, human rubrics, regression suites, and clear release gates.

Three cover candidates for The Goats Were Load-Bearing fanned on a dark background: an ember-lit door, three slow knocks, and a founders' ledger
The Goats Were Load-Bearing: a fantasy where the bill always comes due
2026-07-19

A teaser for the upcoming darkly comic fantasy novel The Goats Were Load-Bearing — a village, a door that must stay poor, and the worst possible time to sell the herd. Readers pick the cover.

Vegan Power game: the yellow player catches falling fruit while a chicken and a cow look on
Vegan Power: The Little Game About Eating Fruit, Not Friends
2026-07-19

Vegan Power is a free browser game where you catch fruit, dodge the animals, protect seven hearts, and chase a better high score.

KotobaMon title screen: the Japanese logo コトバモン over a low-poly 3D island with monsters, cherry-blossom trees and a trainer.
KotobaMon: Shipping a 3D Browser Game With No Build Step and Self-Hosted Voice
2026-07-19

A look at fantasy.grn.dk, a browser-based 3D game that teaches Japanese with no build step, procedural art and self-hosted AI voice, and what its constraints show about shipping interactive products fast and cheap.

Illustrated infographic summarizing: WordPress Forced an Emergency Update. Did Every Site Take It?
WordPress Forced an Emergency Update. Did Every Site Take It?
2026-07-18

WordPress pushed an emergency security update, but teams still need to confirm the right patched version and core integrity on every installation.

Illustrated infographic summarizing: IndexNow: Wire corrections and deletions into the CMS
IndexNow: Wire corrections and deletions into the CMS
2026-07-17

IndexNow works best when CMS workflows report updates, redirects and removals as well as new pages. Here is how to cover the full content lifecycle.

Illustrated infographic summarizing: The EU’s August AI Deadline Reaches Bots and Synthetic Content
The EU’s August AI Deadline Reaches Bots and Synthetic Content
2026-07-16

Article 50 applies from 2 August 2026. Businesses need to map AI touchpoints, clarify ownership, and put workable transparency controls in place.

More articles
RSS feed

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