初学者MYSQL错误-拒绝访问 [英] Beginner MYSQL Error - Access Denied

查看:75
本文介绍了初学者MYSQL错误-拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误1045(28000):用户'root'@'localhost'的访问被拒绝(使用密码:N O)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N O)

我已经尝试了一切,阅读了答案页面,似乎没人知道正确的答案.

I've tried EVERYTHING, I've read through pages of answers and no-one seems to know the right one.

当我尝试登录数据库时,遇到上述错误,我没有设置密码或其他任何内容.

When i try to log into my DB i just get the above error, I havent set a password or anything.

现在根本无法登录MySQL,

Can't log into MySQL at all now, don't understand.

非常感谢您的帮助

推荐答案

使用-p选项. (告诉mysql,您要在登录时提供密码.)

use the -p option. (Tells mysql that you want to provide a password when logging in.)

$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
$ mysql -u root -p
Enter password: 


如果这不起作用,请尝试 B.5.4 .1.如何从MySQL参考手册中重置根密码.

这篇关于初学者MYSQL错误-拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆