zoukankan      html  css  js  c++  java
  • MySQL 8.0.11 初始安装修改root密码

    1.在 /etc/my.cnf 中的 [mysqld] 中添加 skip-grant-table 
    2.使用 [root]# server mysql restart 重启服务
    3.输入 [root]# mysql 无密码登录到mysql中
    4.使用 mysql > use mysql #选择数据库
    5.使用 mysql > update user set authentication_string='' where user='root'; #将root的权限验证字符串更新为空
    6.使用 mysql > select Host,User,authentication_string from user; #查询是否更新成功
    7.使用 mysql > flush privileges #刷新权限
    8.使用 mysql > exit #退出MySQL
    9.在配置文件[root]# vim /etc/my.cnf 中注释  #skip-grant-table 
    10.重复第2步骤 重启服务
    11.使用 [root]# mysql -uroot -p 后直接回车登录到MySQL中 【注意其他语句可能有兼容问题导致【Mysql8.0】ERROR 1820 (HY000): You must reset your password using ALTER USER statement】
    12.使用 mysql > set password='your password'; #输入密码 
    13.重复第7步。
    
  • 相关阅读:
    [ Python ] 递归函数
    [ Python ] 计算器
    [ Python ] 模块详解
    [ python ] 项目:haproxy配置文件增删改查
    [ Python ] 装饰器详解
    iOS设计
    Swift
    Swift
    iOS
    Swift
  • 原文地址:https://www.cnblogs.com/ikai/p/13392246.html
Copyright © 2011-2022 走看看