CentOS安装MySQL遇到的问题记录

208 阅读1分钟

遇到问题

  1. Access denied for user 'root'@'localhost' (using password:YES)

    解决方法:Centos7 安装mysql后登录提示:Access denied for user 'root'@'localhost'

  2. You must reset your password using ALTER USER statement before executing this statement.

    解决方法:You must reset your password using ALTER USER statement before executing this statement报错处理

  3. Your password dose not satisfy the current policy requirements.

    解决方法:

    set global validate_password_policy=0;   --修改级别
    set global validate_password_length=4;   --最小的默认密码位数
    
  4. Host * is not allowed to connect to this MySQL server

    
    use mysql;--使用mysql系统数据库
    
    GRANT ALL PRIVILEGES ON *.* to 'root'@'192.168.1.10' identified by '123456'; --配置192.168.1.10可以通过root:123456访问数据库
    
    flush privileges; --从mysql数据库中的授权表重新载入权限
    
    select * from user; --查看用户权限是否变更
    

更新时间

发布时间 : 2018年11月3