首页 > 数据库技术 > 详细

mac mysql Access denied for user问题解决方法

时间:2015-02-03 22:54:34      阅读:446      评论:0      收藏:0      [点我收藏+]

摘自 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

mac mysql Access denied for user问题解决方法

原文:http://www.cnblogs.com/zhangminjie/p/4271177.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!