Skip to main content

How To Install MySQL 8.0 / 5.7 on Debian 11 / Debian 10


MySQL is one of the most widely used relational database management systems in the world. It is free software licensed under the GPL (General Public License).

A Swedish company, MySQL AB, originally developed MySQL. Now it is owned and developed by the Oracle Corporation.

In this article, we will see how to Install MySQL on Debian 11 / Debian 10.

Add MySQL Repository

MySQL server packages are available through its official repository.  So, we will now download and install the MySQL repository setup package.
wget https://dev.mysql.com/get/mysql-apt-config_0.8.18-1_all.deb

Install the repository package using the dpkg command.
sudo dpkg -i mysql-apt-config_0.8.18-1_all.deb
At the time of writing this post, MySQL 8.0 repository is not yet available for Debian 11 (Bullseye). However, we can use Debian 10 (Buster) MySQL repository to get MySQL 8.0 packages for Debian 11.For Debian 11: Choose the Debian buster and then press Enter.

The package installer will prompt you to select the MySQL version for creating the repository. Go to MySQL 8.0 or MySQL 5.7 section to know more about selecting the right repository for your MySQL installation.

Install MySQL Community Server
Install MySQL Server 8.0

By default, MySQL version 8.0 is selected for the configuration of the repository.
Use the down arrow to choose OK and then press Enter

Wait for the repository configuration to complete and then update the repository index using the apt command.
sudo apt update

Run the following command to install MySQL server 8.0.
sudo apt install -y mysql-community-server 

The package installer will prompt you to,
1. Enter MySQL root password
2. Re-Enter MySQL root password
3. Choose Authentication Method
Use Strong Password Encryption: MySQL will use a new authentication based on the SHA256 password methods. If you choose this method, only the latest version of clients and connectors with caching_sha2_password support can connect to the MySQL server
Use Legacy Authentication Method (Recommended for phpMyAdmin): MySQL will use the old authentication method (mysql_native_password) which all clients and connectors support.

Install MySQL Server 5.7

By default, MySQL version 8.0 is selected for the repository configuration. So, we need to change it to MySQL 5.7 by following the below steps to set up MySQL 5.7 repository.
1. Ensure your selection is in MySQL Server & Cluster (Currently selected: mysql-8.0)  and press Enter
2. Choose mysql-5.7 and then press Enter
3. Now, you should see MySQL Server & Cluster (Currently selected: mysql-5.7)
4. Use the down arrow to choose OK and then press Enter

Update the repository index using the apt update command.
sudo apt update

Use the apt command to MySQL server 5.7.
sudo apt install -y mysql-community-server 

The package installer will prompt you to,

1. Enter MySQL root password
2. Re-Enter MySQL root password

Check MySQL Server

After the installation of the MySQL server, run the following command to check the status MySQL server.
sudo systemctl status mysql 

Output:
● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2021-08-23 05:38:59 CDT; 1min 52s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 2563 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 2598 (mysqld) Status: "Server is operational" Tasks: 37 (limit: 2321) Memory: 359.5M CPU: 1.037s CGroup: /system.slice/mysql.service └─2598 /usr/sbin/mysqld Aug 23 05:38:58 debian11.itzgeek.local systemd[1]: Starting MySQL Community Server... Aug 23 05:38:59 debian11.itzgeek.local systemd[1]: Started MySQL Community Server. 

Work with MySQL Server

Login to MySQL with the MySQL root user and the password you had set during the installation.
mysql -u root -p

Output

MySQL 5.7:
Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.35 MySQL Community Server (GPL) Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> 

MySQL 8.0:
Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> 

Install phpMyAdmin

PHPMyAdmin is a tool written in PHP intended to handle the administration of MySQL and MariaDB servers over the web browser. It provides you with an interface for administrative operations on your database: create, drop, alter tables, delete.

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

Sumber: disini

Comments

Popular posts from this blog

Cara Disable Antimalware Service Executable di Windows 10

Disadari atau tidak, Windows 10 (dan juga windows-windows lainnya) hadir dengan banyak sekali aplikasi bloatware (aplikasi yang tidak perlu-perlu amat dimiliki oleh end user). Contohnya, adalah aplikasi yang seharusnya sudah tergantikan fungsinya oleh antivirus, seperti Antimalware Service Executable . Aplikasi ini dicurigai membuat Windows 10 mengalami inefisiensi memori/RAM, memakan resource yang tinggi, dengan Load yang tinggi (tanpa limit terkadang). Nah, berikut adalah cara men-disable nya: Tekan tombol Windows + I untuk membuka apliaksi Windows Setting. Pilih icon menu Update and Security Pilih lagi menu disamping kiri Windows Security Pada jendela baru yang muncul, ada pilihan Virus & Threat protection Klik ini Lalu matikan proses Real-time protection tersebut. Dengan Regedit. Buka dialog regedit, Windows + R dan ketik ‘regedit’ Cari Folder regedit ini HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Buat sebuah DWORD baru dengan klik kanan

Setup Debian 11 Official Repository In sources.list (/etc/apt/sources.list)

When you install Debian 11 using a DVD, the OS installer sets the DVD as the source for getting packages for your system if you didn't choose to scan for network mirrors. Due to this reason, the system would ask you to insert a DVD if the disc is not present in the DVD drive when you try to install any software.  Also, the packages on DVD may not be the latest release.  So, we need to get the packages from the Internet. Media change: please insert the disc labeled 'Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04' in the drive '/media/cdrom/' and press [Enter] The /etc/apt/sources.list file with DVD as a source would look something like below. # deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb http://security.debian.org/debian-security bullseye-security

Cara Berlangganan ke Akun OnlyFans

Ada dua jenis akun di OnlyFans: akun pengguna dan akun pembuat konten. Jika Anda berlangganan akun OnlyFans, maka Anda adalah pengguna. Sementara beberapa akun pembuat OnlyFans tidak mengenakan biaya untuk melihat konten mereka, yang lain dapat mengenakan biaya bulanan $50. Dalam artikel ini, kami akan menunjukkan cara berlangganan akun OnlyFans di berbagai perangkat. Kami juga akan membahas proses berlangganan akun OnlyFans tanpa kartu kredit atau debit. Cara Berlangganan Akun OnlyFans Tanpa Menggunakan Kartu Kredit Pribadi Anda Sebagai salah satu platform paling populer di industri hiburan dewasa, OnlyFans memiliki 130 juta pelanggan dan 2 juta kreator. Meskipun ada sedikit kontroversi seputar aplikasi ini, ada akun pengguna baru yang dibuat setiap hari. Jika Anda ingin membuat akun pengguna, Anda harus melakukannya di situs OnlyFans. Ingatlah bahwa Anda harus berusia minimal 18 tahun untuk membuat akun OnlyFans.