阿里云linux安装mysql8
1:
rpm -ivh http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
2:
yum install -y mysql-server
3:
yum install mysql-community-server
4:
systemctl enable mysqld.service
5:
systemctl list-unit-files | grep mysqld
6:
systemctl start mysqld.service
7: (查看默认密码)
cat /var/log/mysqld.log | grep password
8:
mysql -uroot -p
输入密码
9:
alter user 'root'@'localhost' identified by 'SsS987_SsS257';
10:
set global validate_password.policy=0;
11:
set global validate_password.length=1;
12:
alter user 'root'@'localhost' identified by '新密码';
13: (以下用来开启远程访问)
use mysql;
14:
update user set host='%' where user='root';
15:
flush privileges;