Oracle’s MySQL APT repository supplies MySQL packages for supported Debian and Ubuntu systems. This guide covers a new installation on an independently managed server, not an unplanned replacement of an existing database service.

What is the MySQL APT repository?

It is Oracle’s package source for selected MySQL release series and related tools. Using the repository does not automatically choose a compatible version or keep the server secure without planned updates.

Before installing

Check the operating-system and application requirements. Do not add this repository to a cPanel or Plesk server that manages its own database packages without following the panel’s supported process.

If MySQL, MariaDB or Percona is already installed, stop and plan a supported migration or upgrade with verified backups. This fresh-install procedure is not an interchangeable replacement method.

Step-by-step installation process

  1. Download the current repository configuration package from Oracle’s MySQL APT download page, using the official verification details.
  2. Install the actual downloaded package, replacing the placeholder filename:
sudo dpkg -i ./MYSQL_APT_CONFIG_PACKAGE.deb
  1. In the configuration dialogue, select a supported MySQL release series suitable for the application.
  2. Refresh the package index and review the candidate package:
sudo apt update
apt-cache policy mysql-server
  1. If the source and version are correct, install it:
sudo apt install mysql-server
  1. Follow the installer prompts, then check the service:
systemctl status mysql

Use the authentication method configured during installation. Review the prompts from mysql_secure_installation if using that utility; it changes accounts and test data rather than merely checking the server.

Best practices for hosting servers

Create application-specific users with only the required privileges. Restrict network access, arrange backups with restoration tests, and apply supported updates through a planned maintenance process.

Verify the running server with a successful authorised connection and SELECT VERSION();. Repository installation does not guarantee application compatibility or enable automatic updates by itself.