Installing MySQL 8 on Debian 12
Step 1: Remove existing and Update the Repositories Packages
apt purge mariadb* apt purge mysql* apt-get update cd /usr/src
Step 2: Download latest repo
You can download latest MySQL repo from https://dev.mysql.com/downloads/repo/apt/
Copy the download path after clicking on download and to download, just type wget
and paste the copied URL
# For example wget https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb # to install the apt config file, run apt install ./mysql-apt-config_0.8.33-1_all.deb # select the suitable options in the command line # recommended MySQL 8.0
Step 3: Make Debian to use mysql package manager instead of default package manager to install MySQL-server
Edit nano /etc/apt/preferences.d/stable
This is to tell debian to use default Debian repo to install packages.
Package: * Pin: release o=Debian Pin-Priority: 900
Edit nano /etc/apt/preferences.d/mysql
This is to tell debian to use mysql as repo for mysql8
Package: mysql-* Pin: origin "repo.mysql.com" Pin-Priority: 900
Install mysql-server
apt update apt install mysql-server
Start the service
systemctl enable mysql systemctl start mysql systemctl status mysql
To login into Mysql Command line
mysql
Tagged:
0
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal