Databases 35 min read

Step‑by‑Step Guide to Installing MySQL Offline DEB Packages on Ubuntu and Debian

This tutorial shows how to download MySQL DEB bundles, extract them, resolve dependencies, and install MySQL 8.0 or 8.4 on Ubuntu 20.04/22.04/24.04 and Debian 12 using dpkg, with detailed command sequences and screenshots for each step.

Raymond Ops
Raymond Ops
Raymond Ops
Step‑by‑Step Guide to Installing MySQL Offline DEB Packages on Ubuntu and Debian

2.2.2.2.1 MySQL 8.0

Download the MySQL DEB bundle from MySQL.com (select version 8.0.43, OS Ubuntu Linux, and the appropriate Ubuntu version), then extract the tar file.

Download MySQL DEB bundle
Download MySQL DEB bundle

Install the packages in the exact order to avoid dependency errors:

# wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-server_8.0.43-1ubuntu24.04_amd64.deb-bundle.tar
# tar xf mysql-server_8.0.43-1ubuntu24.04_amd64.deb-bundle.tar
# dpkg -i mysql-community-client-plugins_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-client-core_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i mysql-common_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i mysql-client_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i libmysqlclient21_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i libmysqlclient-dev_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-server-core_8.0.43-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-server_8.0.43-1ubuntu24.04_amd64.deb

If dpkg reports missing dependencies (e.g., libmecab2), install them with apt install -y libmecab2 and repeat the failed dpkg command.

After the server package is installed, start MySQL and enable it at boot:

# systemctl enable --now mysql
# mysql -V

Enter the root password when prompted (see screenshots t45‑t47) and verify the installation with mysql and show databases;.

Enter MySQL root password
Enter MySQL root password

Installation on Ubuntu 22.04

Repeat the same steps, selecting the Ubuntu 22.04 (x86, 64‑bit) option on the download page (image t49). Use the same dpkg order; resolve libmecab2 if needed.

Download MySQL DEB bundle for Ubuntu 22.04
Download MySQL DEB bundle for Ubuntu 22.04

Installation on Ubuntu 20.04

Download the Ubuntu 20.04 bundle (image t49) and follow the same dpkg sequence. Resolve missing libmecab2 and libtirpc3 with apt install -y libmecab2 libtirpc3, then finish the installation.

Installation on Debian 12

Download the Debian 12 bundle (image t50) and extract it. Install packages in order, then install required dependencies:

# apt install -y libaio1 libmecab2 libnuma1 psmisc
# dpkg -i mysql-community-server-core_8.0.43-1debian12_amd64.deb
# dpkg -i mysql-community-server_8.0.43-1debian12_amd64.deb
Download MySQL DEB bundle for Debian 12
Download MySQL DEB bundle for Debian 12

Enter the root password (images t51‑t53) and verify with mysql.

Enter MySQL root password on Debian
Enter MySQL root password on Debian

2.2.2.2.2 MySQL 8.4

For MySQL 8.4 LTS, repeat the same workflow: download the DEB bundle for the target OS (images t57, t59, t60), extract, install packages in order, and resolve the same libmecab2 dependency.

# wget https://cdn.mysql.com//Downloads/MySQL-8.4/mysql-server_8.4.6-1ubuntu24.04_amd64.deb-bundle.tar
# tar xf mysql-server_8.4.6-1ubuntu24.04_amd64.deb-bundle.tar
# dpkg -i mysql-community-client-plugins_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-client-core_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i mysql-common_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i mysql-client_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i libmysqlclient24_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i libmysqlclient-dev_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-server-core_8.4.6-1ubuntu24.04_amd64.deb
# dpkg -i mysql-community-server_8.4.6-1ubuntu24.04_amd64.deb

Install missing libmecab2 if required, then start the service:

# systemctl enable --now mysql
# mysql -V
Download MySQL 8.4 DEB bundle for Ubuntu 24.04
Download MySQL 8.4 DEB bundle for Ubuntu 24.04

After installation, verify the server version and list databases as shown in the screenshots (t58, t67‑t71).

# mysql
mysql> status;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema|
| sys                |
+--------------------+

All steps are identical for Ubuntu 22.04 and Debian 12; just replace the download URLs and package names accordingly.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

databasemysqlInstallationDebiandebdpkg
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.