Centos7安装mysql8教程

1.配置Mysql 8.0安装源:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
yum -y install mysql-community-server

2.安装Mysql 8.0

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

3.启动mysql服务

安装完的第一件事当然是启动mysql服务啦

 service mysqld start

4.

mysql_secure_installation #修改Mysql密码,输入之前生成的密CSJlm3DyTG.d回车,根据提示操作。

Press y|Y for Yes, any other key for No: y #是否安装密码安全插件?选择y

There are three levels of password validation policy: #有以下几种密码强度选择

LOW Length >= 8

MEDIUM Length >= 8, numeric, mixed case, and special characters

STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 #选择0,只要8位数字即可,选1要有大写,小写,特殊字符等

UNINSTALL PLUGIN validate_password ; #卸载密码强度插件

use mysql;

update mysql.user set authentication_string=password('123456') where user='root' ; #登录mysql控制台修改

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS '123456'; #修改密码

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值