On a Debian 12 (bookworm) VPS, the most reliable way to install current MySQL is to configure Oracle’s MySQL APT repository, select the release series you intend to operate, refresh APT metadata, install mysql-server, verify the systemd service, and run mysql_secure_installation when you need to harden local access. The repository index observed for this guide (updated 19 August 2026) lists MySQL 9.7 LTS, 8.4 LTS, 8.0, Innovation, and MySQL Tools. Because that list can change, “latest” means the newest series actually offered by the repository when you configure the VPS—not an unqualified version number.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What “latest MySQL” means on Debian 12
MySQL on Debian is distributed through release series rather than one permanently fixed package. Oracle’s APT repository lets you choose a series during repository setup; subsequent installations and upgrades follow that selection. This is important on a production VPS: selecting a series is an operational decision, not merely a download choice.
As an Amazon Associate I earn from qualifying purchases.
The Debian bookworm repository index available for this article was updated on 19 August 2026 and contained these entries:
| Repository entry | How to interpret it | When to choose it |
|---|---|---|
mysql-9.7-lts |
Newest LTS entry visible in the checked bookworm index | For a new deployment that wants the newest LTS series exposed by the repository |
mysql-8.4-lts |
An older LTS series still listed | When application compatibility or an existing fleet requires 8.4 |
mysql-8.0 |
MySQL 8.0 series | Only when your software estate is deliberately maintained on 8.0 |
mysql-innovation |
Innovation release channel | For teams that have explicitly accepted a faster-changing series |
mysql-tools |
Repository tools collection | When you need the associated client, connector, or utility packages |
The index date is not the same as your installation date. Before choosing “latest,” open the repository configuration menu and check which series is offered, then record the selected series in your deployment notes. If the menu offers a newer series than the August index, that newer repository choice is the current one for your VPS.
#1 Best Overall
Check the VPS before changing APT sources
The procedure below targets Debian 12 (bookworm) on amd64. Confirm both values before installing a repository configuration package intended for another distribution or architecture.
- Display the operating-system release information:
cat /etc/os-release
Look for Debian 12 and the codenamebookworm. - Confirm the package architecture:
dpkg --print-architecture
The target architecture for this guide isamd64. - Use an account with
sudoaccess. Repository configuration, package installation, service management, and security changes all require administrative privileges. - If the VPS already contains MySQL data, take a verified backup and identify the current server series before proceeding. An installation or upgrade can restart the database service.
Do not continue by forcing a bookworm repository onto another Debian release. Oracle’s repository configuration is tied to the distribution and series selected during setup.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose an installation path
New installation
A clean installation is appropriate when the VPS has no MySQL data that must be preserved. The Oracle package installs the server, client, and common database files together. The service normally starts automatically when installation completes on a systemd-enabled Debian system.
Existing MySQL installation
If MySQL is already installed, treat this as an upgrade or repository migration. First identify the installed series and compare it with the series offered by the Oracle configuration menu. Oracle states that in-place downgrading through the MySQL APT repository is unsupported. Select a series no lower than the one already installed, and plan a dump-and-restore migration if you truly need to move to an older series.
Oracle APT repository versus Debian-native packages
| Decision factor | Oracle MySQL APT repository | Debian-native packages |
|---|---|---|
| Update source | Oracle’s repository, with a release series selected during setup | Debian’s configured repositories; the exact candidate version is not stated in the Oracle installation material |
| Series selection | Explicit choices such as 9.7 LTS, 8.4 LTS, 8.0, or Innovation are exposed by the bookworm index observed here | Series availability depends on Debian’s package archive and is not established by the cited Oracle documents |
| Downgrades | In-place downgrading is unsupported | Downgrade behavior depends on Debian packages and your migration method; do not assume it is safe |
| Operational risk | You must track the selected Oracle series and accept a service restart during APT upgrades | You avoid Oracle’s repository configuration step but may receive a different version cadence; verify the candidate before installing |
For this guide’s “latest MySQL” goal, use the Oracle repository and make the series choice explicit. If your application is certified only for a particular series, choose compatibility over the newest label.
Add Oracle’s MySQL APT repository
Oracle distributes a repository configuration package for Debian. Obtain the current MySQL APT repository configuration package from Oracle’s official MySQL download area, save it on the VPS, and install that local package with dpkg. The exact package filename changes as Oracle publishes revisions, so do not copy an old filename from an unrelated tutorial.
- Download the current MySQL APT repository configuration package for Debian. Keep only the intended package in the directory where you will run the install command.
- Install the downloaded package. A shell glob can be used when the directory contains one matching package:
sudo dpkg -i ./mysql-apt-config_*_all.deb
If the filename supplied by Oracle differs, use that exact filename instead. - When the configuration screen opens, select the Debian distribution entry for bookworm.
- Open the MySQL server series menu and choose the series you intend to run. For a new deployment seeking the newest LTS entry visible in the 19 August 2026 index, that choice was
mysql-9.7-lts. Choose 8.4 LTS, 8.0, or Innovation only when your compatibility and release policy calls for it. - Review the remaining selections, confirm the repository configuration, and let
dpkgfinish.
The configuration package does not install the database server by itself. It adds the Oracle repository definition and records the series choice so that APT can resolve mysql-server from that source.
Refresh package metadata before installing
Run the metadata refresh immediately after repository configuration:
sudo apt-get update
Oracle marks this step as mandatory. It downloads the package indexes, including the MySQL series you selected. If you skip it, APT may report that it cannot locate mysql-server, or it may use stale metadata that does not reflect the newly added source.
Read the output for repository errors. A release-file, signature, distribution, or architecture error means the repository configuration does not match the VPS and should be corrected before installation. Do not work around an APT error by mixing repositories from a different Debian release.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesInstall the MySQL server package
Install the server with Oracle’s documented command:
sudo apt-get install mysql-server
This package installs the MySQL server, client, and common database files. APT may ask you to approve the package list and any dependencies. Confirm only after checking that the proposed packages come from the intended repositories and that the selected series is the one you recorded.
During package configuration, pay attention to any root-authentication prompt. If you leave the root password blank, Oracle documents that local Unix-socket access can use socket peer-credential authentication instead of a password. You can set or revise a password later with mysql_secure_installation.
Verify that MySQL started
On systemd-enabled Debian systems, Oracle documents that the MySQL server starts automatically after installation. Check the service rather than assuming the package operation succeeded:
Recommended Free Tools
systemctl status mysql
A healthy result shows the mysql unit loaded and active. The service-management commands are:
Rank #4
| Action | Command | Use |
|---|---|---|
| Inspect | systemctl status mysql |
Shows whether the service is running and recent startup messages |
| Start | sudo systemctl start mysql |
Starts a stopped server |
| Stop | sudo systemctl stop mysql |
Stops the server for maintenance |
| Restart | sudo systemctl restart mysql |
Restarts after a configuration change or controlled maintenance |
If the status is not active, read the unit’s error text before repeatedly restarting it. A failed package configuration, a conflicting existing data directory, or a repository-selected package mismatch needs to be resolved at its cause.
Run the initial security configuration
Installation and service startup do not replace hardening. Run:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo mysql_secure_installation
The utility is used to set or revise root credentials and remove insecure defaults. The exact prompts depend on the installed MySQL series and the authentication state created during package configuration. If root was configured for socket peer-credential authentication, local administrative access may initially work through the Unix socket without a password; use the utility when you need to establish password-based credentials or review the other hardening choices it presents.
Keep the chosen root-authentication method in your operational notes. Socket authentication is tied to local operating-system credentials, while a configured password is needed by clients that authenticate with a password. Do not distribute the root credential to applications; create separate least-privilege accounts after the server is secured.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Record the selected series and package state
Oracle’s APT workflow follows the major release series selected during repository setup. Record that choice alongside the VPS name, installation date, Debian release, and backup location. This prevents a later administrator from assuming that “latest” is a fixed version or unintentionally changing series during maintenance.
Best Value
- Write down the Debian release: Debian 12 (bookworm).
- Write down the architecture: amd64.
- Write down the selected repository series, such as
mysql-9.7-ltsormysql-8.4-lts. - Record the date you configured the repository and the date of the last successful backup.
- Capture the installed package state with your normal change-management tooling so an upgrade can be compared with the previous state.
Do not select a lower series later as a shortcut around an incompatibility. Oracle explicitly states that in-place downgrading through the MySQL APT repository is not supported. Use a logical backup and a planned migration when an older series is unavoidable.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUpgrade MySQL from the Oracle repository
For a routine upgrade within the configured repository workflow, refresh metadata and install the server package again:
- Confirm that the configured series is still the one approved for the application.
- Run
sudo apt-get update. - Run
sudo apt-get install mysql-server. - Check the result with
systemctl status mysqland verify application connectivity.
Oracle notes that the server restarts after an APT update. Schedule that interruption, make sure clients can reconnect, and avoid treating an unattended package refresh as a zero-downtime operation. If the repository now offers a higher series but your configuration still targets the old one, do not change the series casually; evaluate compatibility and migration requirements first.
Troubleshoot common installation problems
“Unable to locate package mysql-server”
- Run
sudo apt-get updateafter installing the repository configuration package. - Reopen the repository configuration and confirm that Debian
bookwormand a MySQL server series are selected. - Check that the VPS is actually Debian 12 and that its architecture is supported by the configured source.
- Read APT’s error output. If the repository failed signature or release validation, fix that configuration instead of installing packages from an unrelated source.
The configuration menu does not show the expected series
The available choices are controlled by Oracle’s repository index and can change over time. The index observed on 19 August 2026 listed 9.7 LTS, 8.4 LTS, 8.0, Innovation, and Tools. Select the newest series that is actually offered in your menu, then record the choice. Do not type a series name that the repository has not exposed for bookworm.
The service is installed but inactive
Run systemctl status mysql and read the failure details. Check whether package configuration completed, whether another MySQL or MariaDB process is using the expected resources, and whether an existing data directory belongs to a different installation. Resolve the reported cause, then use sudo systemctl start mysql and inspect the status again.
You need an older MySQL series
Do not attempt an in-place downgrade through APT. Oracle’s repository does not support that operation. Preserve the data with a verified logical backup, provision a server with the required older-compatible environment, and plan a controlled import and application cutover.
Root login behaves differently than expected
Review how root authentication was configured during package installation. A blank root password can result in socket peer-credential authentication for local Unix-socket access. Run mysql_secure_installation to set or revise credentials, then test the exact local or remote authentication method your administrators will use.
Operational checklist
- Debian release confirmed as 12 (bookworm).
- Architecture confirmed as amd64.
- Backup completed for any existing MySQL data.
- Oracle APT repository configuration package installed.
- Bookworm selected in the repository configuration screen.
- Approved MySQL series selected and recorded.
sudo apt-get updatecompleted without repository errors.sudo apt-get install mysql-servercompleted.systemctl status mysqlreports an active service.mysql_secure_installationcompleted when credential hardening was required.- Upgrade and restart expectations communicated to anyone operating the VPS.
Documentation and version context
This procedure follows Oracle’s “A Quick Guide to Using the MySQL APT Repository,” the MySQL 8.4 and 9.7 Linux installation references, and the Debian bookworm repository index updated 19 August 2026. Oracle’s documented commands are the APT installation command, automatic service startup behavior, the systemd service controls, and the warning that in-place downgrades are unsupported. Because repository contents change, verify the series presented by the configuration package on the day you deploy rather than treating the August index as a permanent catalog.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →




