错误1045(28000)访问被拒绝用户'root'@'localhost'(使用密码:是) [英] error 1045 (28000) access denied for user 'root'@'localhost' (using password: YES)

查看:8487
本文介绍了错误1045(28000)访问被拒绝用户'root'@'localhost'(使用密码:是)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请原谅我是一个完整的初学者:

Please forgive me for being a complete beginner:

我试图登录到我的第一个mySQL数据库,我在我的Windows机器上使用easyPHP安装,使用cmd行。我将进入\mysql\bin并输入命令:

I am trying to log into my very first mySQL database that I installed using easyPHP on my windows machine, using the cmd line. I am going to the \mysql\bin and entering the command:

mysql -u root

以便登录,但我收到以下消息:

in order to log in, but I am getting the following message:

error 1045 (28000) access denied for user 'root'@'localhost' (using password: YES)

为什么使用密码YES?应该没有密码吗?我需要重新启动mySQL或什么?如果是,我该怎么做?如果它是相关的,我尝试使用phpmyadmin创建数据库,但有一些问题输入列,并决定我最好从命令行工作,所以我可以学习所有的命令,我一起去。

Why is it using the password "YES"? Shouldn't there be no password at all? Do I need to restart mySQL or something? If so, how do I do that? If it's relevant, I did try to create the database using phpmyadmin, but had a few problems entering columns and decided I'd be better off working from the command line so I could learn all the commands as I went along.

请记住,这是我第一次尝试使用数据库,所以请对我好意。

Please keep in mind that this is my first time ever trying to work with a database, so be kind to me!

推荐答案

要让mysql要求您输入密码,还需要指定 -p -option:

To have mysql asking you for a password, you also need to specify the -p-option:

mysql -u root -p

这篇关于错误1045(28000)访问被拒绝用户'root'@'localhost'(使用密码:是)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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