• centos7 yum mysql8


    CentOS7使用yum安装MySQL8

    1. wget http://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm
    2. sudo yum localinstall mysql80-community-release-el7-2.noarch.rpm
    3. yum安装MySQL:sudo yum install mysql-community-server
    4. 启动MySQL服务:systemctl start mysqld
    5. 检查MySQL服务状态:systemctl status mysqld
    6. 修改无密码登录:vim /etc/my.cnf 加入skip-grant-tables
    7. 重启MySQL服务
    8. 查看当前安全变量值:SHOW VARIABLES LIKE ‘validate_password%’;在这里插入图片描述
    9. 本地MySQL客户端登录:mysql
    10. flush privileges
    11. 修改密码: ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
    12. 其它:
      ±-------------------------------------±-------+
      | Variable_name | Value |
      ±-------------------------------------±-------+
      | validate_password.check_user_name | ON |
      | validate_password.dictionary_file | |
      | validate_password.length | 6 |
      | validate_password.mixed_case_count | 1 |
      | validate_password.number_count | 1 |
      | validate_password.policy | LOW |
      | validate_password.special_char_count | 1 |
      | validate_password_check_user_name | ON |
      | validate_password_dictionary_file | |
      | validate_password_length | 8 |
      | validate_password_mixed_case_count | 1 |
      | validate_password_number_count | 1 |
      | validate_password_policy | MEDIUM |
      | validate_password_special_char_count | 1 |
      ±-------------------------------------±-------+
      可在/etc/my.cnf中添加上面的配置,如下图:
      在这里插入图片描述
    PolicyTests Performed
    0 or LOW Length
    1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
    2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

    远程连接问题: authentication plugin caching_sha2_password
    修改密码:ALTER USER ‘root’@’%’ IDENTIFIED WITH mysql_native_password BY ‘123456’;

  • 相关阅读:
    第四次作业
    第三次作业
    作业,11
    作业,10
    作业,9
    作业,8
    作业,7
    作业,6
    作业,5
    作业,4
  • 原文地址:https://www.cnblogs.com/ruiy/p/13825477.html
Copyright © 2020-2023  润新知