Linux(CentOS)安装Mysql8.0

From: 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’@’%’ identified by ‘密码’;
Mysql8.0默认使用caching_sha2_password加密

13.赋值权限

grant all on *.* to ‘yiiwang’@’%’ ;

14.设置自动启动

systemctl enable mysqld
systemctl daemon-reload

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值