zoukankan      html  css  js  c++  java
  • mac mysql Access denied for user问题解决方法

    摘自 stackoverflow回答

    Here is the procedure to reset password of root user.

    1) Stop mysql (Kill mysql process or run following command)

    sudo /usr/local/mysql/support-files/mysql.server stop

    2) Start it in safe mode

    sudo mysqld_safe --skip-grant-tables

    3) Open another terminal and run the following command (Keep last terminal open)

    mysql -u root

    4) Run the following command with suitable new password on the mysql console

    mysql > UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';

    5) mysql > FLUSH PRIVILEGES;

    6) Quit from both terminals and open new terminal and connect to mysql with root user and new password

    mysql -uroot -p
  • 相关阅读:
    c# 不常用逻辑运算符
    c# 简单日志记录类 log

    最短路径
    A+B
    floyd 算法
    Kruskal 算法
    快排
    顺序表的逆排
    顺序表中多余元素的删除
  • 原文地址:https://www.cnblogs.com/zhangminjie/p/4271177.html
Copyright © 2011-2022 走看看