首页 > 数据库技术 > 详细

新装mysql数据库登陆不上去(账号密码正确)

时间:2017-03-23 20:55:51      阅读:340      评论:0      收藏:0      [点我收藏+]
  1. Open & Edit /etc/my.cnf
  2. Add skip-grant-tables under [mysqld]
  3. Restart Mysql
  4. You should be able to login to mysql now using the below command mysql -u root -p
  5. Run mysql> flush privileges;
  6. Set new password by ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘NewPassword‘;
  7. Go back to /etc/my.cnf and remove/comment skip-grant-tables
  8. Restart Mysql
  9. Now you will be able to login with the new password mysql -u root -p

新装mysql数据库登陆不上去(账号密码正确)

原文:http://www.cnblogs.com/kedarui/p/6606628.html

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