zoukankan      html  css  js  c++  java
  • mysql忘记root密码

    1,service mysql stop       # mysql5.1版本的服务名是 mysqld,而mysql5.6版本的二进制包的服务名是 mysql.

    2, /etc/init.d/mysql start  --skip-grant-tables

    3,mysql

    >  此时就可以在mysql里面修改root密码了

    mysql> update mysql.user set password= password('123456') where user='root';

    4,/etc/init.d/mysql stop 

    5, mysql -uroot -p123456     # ------> 此时就可以进入到MySQL了。

    mysql>  

    mysql> grant all privileges on *.* to root@'localhost' identified by '123456';    #这条命令在 --skip-grant-tables状态下修改不了密码表。
    ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it ca
    mysql>

  • 相关阅读:
    第五次博客作业
    第三次博客作业
    个人简介
    实验三
    实验二
    实验一
    《构建之法》心得体会
    第三次博客园作业
    软件测试实验二
    个人简历
  • 原文地址:https://www.cnblogs.com/kaishirenshi/p/9155604.html
Copyright © 2011-2022 走看看