下载网址为:https://dev.mysql.com/downloads/repo/yum/
选择对应版本点击下载,也如页面后复制以下链接:
wget 刚才复制的链接
wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
rpm -ivh 下载的文件名
rpm -ivh mysql80-community-release-el8-1.noarch.rpm
yum install mysql-community-server -y
,大概60多M,解压后300多Myum update -y
service mysqld start
service mysqld status
chkconfig mysqld on
grep "password" /var/log/mysqld.log
mysql -uroot -p
输入密码>set global validate_password.policy=0;
>set global validate_password.length=1;
>ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';
>use mysql;
>select user,authentication_string,host from user;
>update user set host = '%' where user = 'root';