How to Install MySQL 8 on Debian 13

MySQL is an open-source, fast, reliable, and flexible relational database management system, typically used with PHP. In this article, we are going to learn how to install MySQL 8 on Debian 13. So, let’s get started.

Pre-requisites

  • A system with Debian 13 installed and running.

  • root access to the system.

Once you're all set, we'll proceed with MySQL 8 installation and configuration.

Add Repository

Let us begin with adding the MySQL Dev apt repository.

apt update

apt -y install wget gnupg

wget https://repo.mysql.com//mysql-apt-config_0.8.32-1_all.deb

dpkg -i mysql-apt-config_0.8.32-1_all.deb

Debian Trixie (Debian 13) is not directly listed in MySQL’s repo config. You can safely select Debian Bookworm during the configuration prompt.

images

images

images

Fix Missing libaio1 Dependency

MySQL requires libaio1, which is no longer included in Debian 13.
We can install it from the Debian 12 (Bookworm) repository:

cd /tmp
wget http://deb.debian.org/debian/pool/main/liba/libaio/libaio1_0.3.113-4_amd64.deb
apt install ./libaio1_0.3.113-4_amd64.deb

Install MySQL 8

Let's install MySQL 8 using the below commands.

apt update

apt -y install mysql-server

images

images

images

images

Create Database

Let us begin with creating a Database and a user. We will then grant the required privileges to the user so it can interact with the Database:

    mysql -u root -p
    CREATE USER 'test_user_crowncloud'@'localhost' IDENTIFIED BY "Password_crowncloud";

    CREATE DATABASE test_db_crowncloud;

    GRANT ALL PRIVILEGES ON test_db_crowncloud.* TO 'test_user_crowncloud'@'localhost';

    FLUSH PRIVILEGES;

    EXIT

The above commands will give complete access to the test_db_crowncloud Database to the user test_user_crowncloud. We suggest using a strong and long password.

images

Now you have successfully installed MySQL 8 on Debian 13.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS