www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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’;

posted on 2020-10-16 11:21  秦瑞It行程实录  阅读(108)  评论(0编辑  收藏  举报
www.cnblogs.com/ruiyqinrui