How to Install MySQL on Debian 10 Linux

How to Install MySQL on Debian 10 Linux

MySQL, the world’s most popular open-source relational database management system is not available in the default Debian’s repositories. MariaDB is the default database system in Debian 10.

Configuring MySQL Repository

To add the MySQL APT repository to your system go to the repository download page and download the latest release package using the following wget command:


Once the download is completed install the release package as a user with sudo privileges:

sudo apt install ./mysql-apt-config_0.8.13-1_all.deb

You will be presented with the configuration menu from where you can select the MySQL version you want to install.

MySQL 8.0 is pre-selected, if you want to install MySQL 5.7, select MySQL Server & Cluster (Currently selected: mysql-8.0) and choose your preferred MySQL version

We’re going to install MySQL version 8.0. Select OK by pressing Tab and hit Enter (as shown in the image above).

If you are not sure which version to choose, consult the documentation of the application you’re going to deploy on your server.

Installing MySQL

Update the package list with and install the MySQL server package by running:

sudo apt update
sudo apt install mysql-server

The installer will ask you to set the MySQL root password. Do not set the password now (leave it blank), we will do that in the next section.

Next, you will be presented with a message informing you about the new MySQL 8 authentication. Before selecting the default MySQL 8 authentication plugin make sure it is supported by your application.

mysql debian 10 linux

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Best MySQL DigitalOcean Performance – ScaleGrid vs. DigitalOcean Managed Databases

Compare ScaleGrid MySQL vs. DigitalOcean Managed Databases - See which offers the best MySQL throughput, latency, and pricing on DigitalOcean across workloads.

How to Install and Use Docker on Debian 10 Linux

Docker is a containerization platform that allows you to quickly build, test and deploy applications as portable, self-sufficient containers that can run virtually anywhere. In this tutorial we'll explain how to install Docker on Debian 10 Buster.

How to Install and Configure Redis on Debian 10 Linux

In this tutorial, we will cover how to install and configure Redis on a Debian 10, Buster. Redis is an open-source in-memory key-value data store. Redis is an open-source in-memory key-value data store. It can be used as a database, cache, and, message broker and supports various data structures such as Strings, Hashes, Lists, Sets, and more. Redis provides high availability via Redis Sentinel, and automatic partitioning across multiple Redis nodes with Redis Cluster.

How to Install LAMP Stack on Debian 10 Buster Server/Desktop

How to Install LAMP Stack on Debian 10 Buster Server/Desktop - This tutorial shows you how to install LAMP stack (Apache, MariaDB, PHP7.3) on Debian 10 Buster. We will see how you can run PHP-FPM with Apache.

Upgrade Debian 9 Stretch to Debian 10 Buster From Command Line

Upgrade Debian 9 to Debian 10 from command line on your desktop computer or server. Debian 10 will be supported for 5 years. The codename "Buster" is named after Andy's dog in the Toy Story movie.