Como instalar MySql 8 no Debian 12.
Para realizar a instalação siga os seguintes passos;
1 º Realizar o update e se necessário, instalar o wget
apt update
apt install wget -y
2 º Realizar o download do repositório do MySql e instalação do mesmo.
wget https://repo.mysql.com//mysql-apt-config_0.8.29-1_all.deb
apt install ./mysql-apt-config_0.8.29-1_all.deb -y
apt update
Ps. Sinta-se avontade para baixar o resitório mais recente no site da MySQl
https://dev.mysql.com/downloads/
Em Configuring mysql-apt-config:
- Selecione Mysql Server e Cluster
- Confirme MySql Server
- Confirme com OK
- Confirme com OK

Caso precise refazer alguma configuração execute:
dpkg-reconfigure mysql-apt-config
Instale o MySql
apt update
apt install mysql-server -y
3º Configure os serviços
systemctl enable --now mysql
systemctl status mysql
4º Execute o Secure Instalations
mysql_secure_installation
Press y|Y for Yes, any other key for No: Y
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y