How to Install MySQL 5.7 on Debian 11

MySQL is one of the most popular open-source databases, which stands out for its ease-of-use and high availability. This blog introduces how to install mysql on Debian 11.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
nick-zhao

Updated by Nick Zhao on 2022/12/31

Table of contents
  • Installation process

  • Backup MySQL for data security guarantees

MySQL is one of the most popular open-source databases, which stands out for its ease-of-use and high availability.

Because of its small size, fast speed, low total cost of ownership, and open source code, the MySQL database has a wide range of applications. Generally, the development of small and medium-sized websites chooses MySQL as the website database. Due to the excellent performance of its community edition, it can form a good development environment with PHP and Apache servers.

MySQL can be installed on Windows and many Linux distributions including CentOS, Debian, and Ubuntu. This blog is going to guide you how to install MySQL 5.7 on Debian 11.

Installation process

1. Download mysql-server_5.7.32-1debian10_amd64.deb-bundle.tar

2. Unzip tar xvf mysql-server_5.7.35-1debian10_amd64.deb-bundle.tar

3. Prepare to install

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install libsuma1

4. Start the installation (need to follow the order)

sudo dpkg -i mysql-common_5.7.35-1debian10_amd64.deb

sudo dpkg-preconfigure mysql-community-server_5.7.35-1debian10_amd64.deb

Prompt for root password

Continue to execute the following command after entering

sudo dpkg -i libmysqlclient20_5.7.35-1debian10_amd64.deb

sudo dpkg -i libmysqlclient-dev_5.7.35-1debian10_amd64.deb

sudo dpkg -i libmysqld-dev_5.7.35-1debian10_amd64.deb

sudo dpkg -i mysql-community-client_5.7.35-1debian10_amd64.deb

If it prompts that libaio1 is missing, install it, and continue without prompting

sudo apt-get install libaio1

continue

sudo dpkg -i mysql-community-client_5.7.35-1debian10_amd64.deb

sudo dpkg -i mysql-client_5.7.35-1debian10_amd64.deb

sudo dpkg -i mysql-common_5.7.35-1debian10_amd64.deb

Install dependencies

sudo apt-get -f install

sudo apt-get -f install libmecab2

install mysql-server

sudo dpkg -i mysql-community-server_5.7.35-1debian10_amd64.deb

sudo dpkg -i mysql-server_5.7.35-1debian10_amd64.deb

5. After the installation is complete, execute mysql

6. Start the database service

$ sudo service mysql start

Backup MySQL for data security guarantees

You can backup MySQL installed on CentOS with Vinchin Backup & Recovery. It supports backup of mysql 5.7 with a bunch of cutting-edge and effective features.

1672463054750721.png

- Automatic, regular full backup, incremental backup, and log backup

- Data deduplication & compression

- Encrypted transmission via SSL encryption

- Backup storage protection to prevent data from ransomware attacks

Download the 60-day full-featured free trial to get the journey started.

Share on:

Categories: Database Tips