YiiWang

Linux(CentOS)安装Mysql8.0
1.官网下载Mysql安装源:Mysql8.0wget https://repo.mysql.com//mysql...
扫描右侧二维码阅读全文
17
2019/10

Linux(CentOS)安装Mysql8.0

1.官网下载Mysql安装源:Mysql8.0

wget https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm

2.安装Mysql源

yum -y install mysql80-community-release-el7-3.noarch.rpm

3.安装Mysql

yum -y install mysql-community-server

4.启动Mysql

service mysqld start

6.停止Mysql

service mysqld stop

6.查看Mysql运行状态

service mysqld status

7.查看初始密码

sudo grep 'temporary password' /var/log/mysqld.log

8.登录Mysql

mysql -uroot -p

9.修改root登录密码[mysql8.0以上密码策略限制必须要大小写加数字特殊符号]

alter user'root'@'localhost' identified with mysql_native_password by '新密码';

10.修改Mysql访问限制

update user set Host ='%' where User = "root";

11.刷新Mysql

flush privileges;

12.新增用户

create user 'yiiwang'@'%' mysql_native_password identified by '密码';
Mysql8.0默认使用caching_sha2_password加密

13.赋值权限

grant all on . to 'yiiwang'@'%' ;

14.设置自动启动

systemctl enable mysqld
systemctl daemon-reload

Last modification:December 4th, 2019 at 07:01 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment