CentOS8安装mysql8.0

Installing and Setting up the Percona Server for MySQL 8.0 Repository

yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm

disable mysql module repo:

percona-release setup ps80

Installing and Setting up the Percona Server for MySQL 8.0 Binaries

yum -y install percona-server-server

Launch:

systemctl start mysqld
systemctl status mysqld

change password

sudo grep "temporary password" /var/log/mysqld.log
mysql -uroot -p

Change default password:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'qaz1!Xsw2@';

Weak password

mysql> set global validate_password.policy=0;

set password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'xbfirst80';

Ref