How to Install MySQL on Debian 10

Install MySQL on Debian 10

In this article, we will have explained the necessary steps to install and configure MySQL on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

MySQL is the most popular open-source relational database management system. It supports both SQL and NoSQL, and has a pluggable storage engine architecture. Additionally, it also comes with multiple database connectors for different programming languages, allowing you to develop applications using any of the well known languages, and many other features.

Install MySQL on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Installing MySQL on Debian.

Install the MySQL package with the following command:

Now confirm the installation and check MySQL version typing following command:

After completing installation MySQL will start automatically:

Step 3. Secure MySQL server.

You should now run mysql_secure_installation to configure security for your MariaDB server:

Then enter YES/Y to the following security questions:

As a test, you can log into the MariaDB server and run the version command:

Congratulation, you have learned how to install and configure MySQL on Debian 10 Buster. If you have any question, please leave a comment below.