【问题标题】:phpMyAdmin won't stop throwing "#1130 - Host 'localhost' is not allowed to connect to this MySQL server "phpMyAdmin 不会停止抛出“#1130 - Host 'localhost' is not allowed to connect to this MySQL server”
【发布时间】:2012-07-15 20:47:17
【问题描述】:

我正在尝试输入http://localhost/phpmyadmin/index.php,但我不断收到:

Error
MySQL said: 

#1130 - Host 'localhost' is not allowed to connect to this MySQL server 
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

我尝试过写hereand hereand also hereand last but not least - here,但是没有任何效果。

如何解决这个烦人的消息?

最好的问候

编辑:

来自run 我打了cmdC:\Users\internet>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe" "--def aults-file=C:\ProgramData\MySQL\MySQL Server 5.5\my.ini" "-uroot" "--host=127.0. 0.1" "-p"

那我进去了:

C:\Users\internet>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe" "--def
aults-file=C:\ProgramData\MySQL\MySQL Server 5.5\my.ini" "-uroot" "--host=127.0.
0.1"  "-p"
Enter password: *******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.5.25 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

然后:

mysql> GRANT ALL on *.* to 'root'@'127.0.0.1' identified by '$roots_password' WI
TH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

但还是什么都没有。

【问题讨论】:

  • @sarnold:添加到我的帖子中。 10 倍。

标签: mysql database phpmyadmin privileges


【解决方案1】:

127.0.0.1 更改为localhost,如下所示:

mysql> GRANT ALL on *.* to 'root'@'localhost' identified by '$roots_password' WITH GRANT OPTION;

因为缺少的主机是localhost 而不是127.0.0.1

【讨论】:

    猜你喜欢
    • 2020-11-17
    • 1970-01-01
    • 2013-10-06
    • 2018-02-16
    • 2017-12-05
    • 2020-08-27
    • 2021-02-04
    • 2016-06-20
    • 2023-03-06
    相关资源
    最近更新 更多