MySQL安装

2020-11-04  本文已影响0人  知道的太少
  1. 下载对应版本的rpm
    wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
  2. 安装对应rpm包
    rpm -ivh mysql57-community-release-el7-9.noarch.rpm
  3. 跳转到/etc/yum.repos.d/,执行yum install mysql-server
  4. 删除以前的配置rm -rf /var/lib/mysql
  5. 启动systemctl start mysqld
  6. 获取临时密码grep 'temporary password' /var/log/mysqld.log
  7. 登录
  8. 查看密码策略SHOW VARIABLES LIKE 'validate_password%';
  9. 修改密码策略set global validate_password.policy=LOW; set global validate_password.length=6;
  10. 修改密码ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
上一篇 下一篇

猜你喜欢

热点阅读