Step 1 – Prerequisites

Login to your Debian 10 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection. Run below commands to upgrade the current packages to the latest version.

Step 2 – Configure MySQL PPA

MySQL team provides official MySQL PPA for Debian Linux. You can download and install the package on your Debian system, which will add PPA file to your system. Run below command to enable PPA. During the installation of MySQL apt config package, It will prompt to select MySQL version to install. Select the MySQL 8.0 or 5.7 option to install on your system.

For this tutorial, we have selected MySQL 5.7 to install on my Debian system. Once you have selected a specific version and you need to change the configuration, use the following command. Select a version of your choice and save.

Step 3 – Install MySQL on Debian 10

Your system is ready for the MySQL installation. Run the following commands to install MySQL on a Debian machine. The installation process will prompt for the root password to set as default. Input a secure password and same to confirm password window. This will be MySQL root user password required to log in to MySQL server.

The next window will ask to re-enter the same password. MySQL 8 provides an extended password security option. This is optional but we recommend to go with this option.

Let the installation complete.

Step 4 – Secure MySQL Installation

Execute the below command on your system to make security changes on your Database Server. This will prompt some questions. The do the high security provide all answers to yes. First start the MysQL service if not started: Then run below command: Follow the on screen instruction’s Select a password validation policy to MEDIUM or STRONG. After that, the process will ask to change the password. You can select a more complex password. Follow the other options and complete the wizard.

Step 5 – Connect MySQL

The MySQL server has been installed on your system. Now connect to the MySQL database using the command line.

How To Install MySQL on Debian 10   TecAdmin - 89How To Install MySQL on Debian 10   TecAdmin - 30How To Install MySQL on Debian 10   TecAdmin - 67