Installing MySQL 8.0 on Debian 12

sachin
edited January 5 in Linux
Install MySQL 8.0
# removing mariadb and any pre-installed mysql packages
apt-get purge mysql\* libmysql\*
apt-get purge mariadb\*

# below 2 commands, only if required
apt autoremove
apt --fix-broken install

cd /usr/src
wget https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb
dpkg -i /usr/src/mysql-apt-config_0.8.29-1_all.deb

# if need to reconfigure it
dpkg-reconfigure mysql-apt-config

Setting the repo by editing nano /etc/apt/preferences.d/mysql

Package: mysql-*
Pin: origin "repo.mysql.com"
Pin-Priority: 900

Installing MySQL 8.0

apt update
apt install mysql-server

systemctl status mysql
systemctl enable mysql
systemctl start mysql
systemctl status mysql


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!