简体   繁体   English

错误1044(42000):用户''@localhost对数据库的访问被拒绝

[英]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.

相关问题 错误1044(42000):用户'@'localhost'对数据库'mysql'的访问被拒绝 - ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql' 错误 1044 (42000):用户 'root'@'localhost' 对数据库 'newdb' 的访问被拒绝 - ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'newdb' 错误 1044 (42000):用户 ''@'localhost' 对数据库 'db' 的访问被拒绝 - ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'db' ERROR 1044(42000):用户''@ localhost'拒绝访问 - ERROR 1044 (42000): Access denied for user ''@'localhost' MySQL 1044(42000):使用Mac对用户'@'localhost'到数据库'mysql'的访问被拒绝 - MySQL 1044 (42000): Access denied for user ' '@'localhost' to database 'mysql' with Mac 错误 1044 拒绝用户 ''@'localhost' 访问数据库 - Error 1044 access denied for user ''@'localhost' to database 错误 1044 (42000):拒绝用户 'root'@'localhost' 访问数据库 (MySQL - MariaDB) - ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database (MySQL - MariaDB) sakila错误1044(42000),位于第46412行:用户'ted'@'localhost'对数据库'sakila'的访问被拒绝 - sakila ERROR 1044 (42000) at line 46412: Access denied for user 'ted'@'localhost' to database 'sakila' mysql> 使用 mysql; 但是......错误1044(42000):用户''@'localhost'对数据库'mysql'的访问被拒绝 - mysql> use mysql; but … ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql' 错误 1044 (42000):拒绝用户访问 - ERROR 1044 (42000): Access denied for user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM