Linux Mysql8.0.11 安装部署

配置yum源

rpm -Uvh https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm 

yum下载安装

yum --enablerepo=mysql80-community install mysql-community-server

查看mysql root 临时密码

grep "A temporary password" /var/log/mysqld.log

根据临时密码重置新密码和密码策略

mysql_secure_installation ;
Password Policy:

启动mysql服务

systemctl start mysqld.service
或者
service  mysqld start

mysql ERROR 1130 问题解决方案

mysql -u root -p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>flush privileges;
mysql>select host, user from user;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则  
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';  #更新一下用户的密码 

你可能感兴趣的:(MySQL)