How To Set up MySQL 8.0 / 5.7 on Debian 11 / Debian 10 | Holhol24

44

MySQL is without doubt one of the most generally used relational database control methods on the planet. It’s loose instrument authorized underneath the GPL (Common Public License).

A Swedish corporate, MySQL AB, in the beginning advanced MySQL. Now it’s owned and advanced via the Oracle Company.

On this article, we will be able to see the best way to Set up MySQL on Debian 11 / Debian 10.

Upload MySQL Repository

MySQL server applications are to be had thru its authentic repository.  So, we will be able to now obtain and set up the MySQL repository setup package deal.

wget https://dev.mysql.com/get/mysql-apt-config_0.8.18-1_all.deb

Set up the repository package deal utilizing the dpkg command.

sudo dpkg -i mysql-apt-config_0.8.18-1_all.deb

On the time of penning this submit, MySQL 8.0 repository isn’t but to be had for Debian 11 (Bullseye). On the other hand, we will use Debian 10 (Buster) MySQL repository to get MySQL 8.0 applications for Debian 11.

For Debian 11: Make a choice the Debian buster after which press Input.

The package deal installer will suggested you to make a choice the MySQL model for developing the repository. Cross to MySQL 8.0 or MySQL 5.7 segment to understand extra about selecting the best repository on your MySQL set up.

Set up MySQL Group Server

Set up MySQL Server 8.0

By means of default, MySQL model 8.0 is chosen for the configuration of the repository.

Use the down arrow to select OK after which press Input

Stay up for the repository configuration to finish after which replace the repository index utilizing the apt command.

sudo apt replace

Run the next command to put in MySQL server 8.0.

sudo apt set up -y mysql-community-server

The package deal installer will suggested you to,

1. Input MySQL root password

2. Re-Input MySQL root password

3. Make a choice Authentication Means

Use Sturdy Password Encryption: MySQL will use a brand new authentication in response to the SHA256 password strategies. If you select this technique, handiest the newest model of purchasers and connectors with caching_sha2_password enhance can connect with the MySQL server

Use Legacy Authentication Means (Really useful for phpMyAdmin): MySQL will use the outdated authentication means (mysql_native_password) which all purchasers and connectors enhance.

Set up MySQL Server 5.7

By means of default, MySQL model 8.0 is chosen for the repository configuration. So, we wish to alternate it to MySQL 5.7 via following the beneath steps to arrange MySQL 5.7 repository.

1. Be certain your variety is in MySQL Server & Cluster (Recently decided on: mysql-8.0)  and press Input

2. Make a choice mysql-5.7 after which press Input

3. Now, you must see MySQL Server & Cluster (Recently decided on: mysql-5.7)

4. Use the down arrow to select OK after which press Input

Replace the repository index utilizing the apt replace command.

sudo apt replace

Use the apt command to MySQL server 5.7.

sudo apt set up -y mysql-community-server

The package deal installer will suggested you to,

1. Input MySQL root password

2. Re-Input MySQL root password

Take a look at MySQL Server

After the set up of the MySQL server, run the next command to test the standing MySQL server.

sudo systemctl standing mysql

Output:

 mysql.provider - MySQL Group Server
     Loaded: loaded (/lib/systemd/gadget/mysql.provider; enabled; seller preset: enabled)
     Lively: lively (working) since Mon 2021-08-23 05:38:59 CDT; 1min 52s in the past
       Doctors: guy:mysqld(8)
             http://dev.mysql.com/document/refman/en/using-systemd.html
    Procedure: 2563 ExecStartPre=/usr/proportion/mysql-8.0/mysql-systemd-start pre (code=exited, standing=0/SUCCESS)
   Major PID: 2598 (mysqld)
     Standing: "Server is operational"
      Duties: 37 (restrict: 2321)
     Reminiscence: 359.5M
        CPU: 1.037s
     CGroup: /gadget.slice/mysql.provider
             └─2598 /usr/sbin/mysqld

Aug 23 05:38:58 debian11.holhol24.native systemd[1]: Beginning MySQL Group Server...
Aug 23 05:38:59 debian11.holhol24.native systemd[1]: Began MySQL Group Server.

Paintings with MySQL Server

Login to MySQL with the MySQL root person and the password you had set all the way through the set up.

mysql -u root -p

Output

MySQL 5.7:

Welcome to the MySQL track.  Instructions finish with ; or g.
Your MySQL connection identity is 3
Server model: 5.7.35 MySQL Group Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its associates.

Oracle is a registered trademark of Oracle Company and/or its
associates. Different names is also emblems in their respective
homeowners.

Sort 'assist;' or 'h' for assist. Sort 'c' to transparent the present enter observation.

mysql>

MySQL 8.0:

Welcome to the MySQL track.  Instructions finish with ; or g.
Your MySQL connection identity is 8
Server model: 8.0.26 MySQL Group Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its associates.

Oracle is a registered trademark of Oracle Company and/or its
associates. Different names is also emblems in their respective
homeowners.

Sort 'assist;' or 'h' for assist. Sort 'c' to transparent the present enter observation.

mysql>

Set up phpMyAdmin

PHPMyAdmin is a device written in PHP meant to care for the management of MySQL and MariaDB servers over the internet browser. It will provide you with an interface for administrative operations for your database: create, drop, modify tables, delete.

READ: How To Set up phpMyAdmin With Apache on Debian 11 / Debian 10

Conclusion

That’s All. I am hoping you might have discovered the best way to Set up MySQL on Debian 11 / Debian 10.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More