[英]ERROR 1044 (42000) : Access denied for user ' '@localhost to database
Having trouble logging in and accessing my database. 登录和访问我的数据库时遇到问题。 Currently using Windows 10 EasyPHP 13.1
当前使用Windows 10 EasyPHP 13.1
I tried logging into my database. 我尝试登录到数据库。 Using
使用
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u jim -p;
An error message appeared saying WARNING: Using a password on the command line interface can be insecure ERROR 1045 (28000): Access Denied for user 'jim'@'localhost' (using password: YES). 出现一条错误消息,警告:警告:在命令行界面上使用密码可能是不安全的错误1045(28000):用户'jim'@'localhost'的访问被拒绝(使用密码:是)。 Then I tried
然后我尝试
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u jim;
This logged me in. However, I still cannot access the database. 这使我登录。但是,我仍然无法访问数据库。 Whenever I type the following command.
每当我键入以下命令时。
USE publications;
I get the error 我得到错误
ERROR 1044 (42000) : Access denied for user ' '@localhost to database 'publications'
I have even tried the following 我什至尝试了以下
GRANT ALL ON publications.* TO 'jim' IDENTIFIED BY 'mypasswd';
and 和
GRANT ALL ON publications.* TO 'jim'@'localhost' IDENTIFIED BY 'mypasswd';
and 和
GRANT ALL PRIVILEGES ON *.* TO 'jim'@'localhost' WITH GRANT OPTION;
as recommended at mysql> use mysql; 按照mysql的建议>使用mysql; but ... ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql'
但是...错误1044(42000):拒绝用户''@'localhost'访问数据库'mysql'
Even Logging in as a -u root won't let me access the database. 即使以-u根用户身份登录也不允许我访问数据库。 I'm at a loss as to what the problem might be.
我不知道可能是什么问题。 Any ideas?
有任何想法吗?
Try this: 尝试这个:
GRANT ALL ON *.* TO 'jim'@'%' IDENTIFIED BY 'mypasswd';
FLUSH PRIVILEGES;
Try this: 尝试这个:
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -ujim
Notice i remove spaces between -u and jim 注意我删除了-u和jim之间的空格
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.