zoukankan      html  css  js  c++  java
  • MySQL--忘记MYSQL管理员密码

    如root用户密码,可以按照以下方式来修改:

    STEP1: 停止MySQL服务


    ps -ef | grep -v 'grep' | grep 'mysqld' | awk '{print $2}' | xargs kill -9

    STEP2: 以忽略权限方式启动MYSQL服务


    /
    export/servers/mysql/bin/mysqld --skip-grant-tables --explicit_defaults_for_timestamp --user=mysql &

    STEP3: 更新管理员密码


    ## MySQL5.6版本更新密码
    update mysql.user set password=password("abc@123.com") where user="root"; ## MySQL5.7版本更新密码 update mysql.user set authentication_string=password("new_pass") where user="root"; ## 刷新权限 flush privileges;

    STEP4: 停止MySQL服务,重新正常启动


    ps -ef | grep -v 'grep' | grep 'mysqld' | awk '{print $2}' | xargs kill -9
    /export/servers/mysql/bin/mysqld_safe --defaults-file=/export/servers/mysql/etc/my.cnf &

  • 相关阅读:
    poj3660 最短路/拓扑序
    poj1502 最短路
    poj3259 最短路判环
    poj1680 最短路判环
    一些自己常用的cdn
    bower
    vuejs点滴
    jquery的ajax
    jquery点滴
    githubpage+hexo构建自己的个人博客
  • 原文地址:https://www.cnblogs.com/gaogao67/p/10385576.html
Copyright © 2011-2022 走看看