美文网首页
MySQL安装

MySQL安装

作者: 知道的太少 | 来源:发表于2020-11-04 09:13 被阅读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';

相关文章

网友评论

      本文标题:MySQL安装

      本文链接:https://www.haomeiwen.com/subject/etfduktx.html