mysql - phpMyAdmin 不会停止抛出 "#1130 - Host ' localhost' is not allowed to connect to this MySQL server "

标签 mysql database phpmyadmin privileges

我正在尝试输入 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.

我试着按照写的做 here , and here , and also here , and 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)

但还是没有。

最佳答案

像这样将 127.0.0.1 更改为 localhost:

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

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

关于mysql - phpMyAdmin 不会停止抛出 "#1130 - Host ' localhost' is not allowed to connect to this MySQL server ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11513888/

相关文章:

c# - 如何使用 C# 将数据库中的所有表所有记录导出为 json

mysql - MySQL 查询的 XML 输出

php - 从表单向数据库提交值

MySQL:在某些字符之间查找和替换

mysql - 内连接语法错误

php - 使用 laravel 查询基于日期时间从数据库中获取数据

php - 非常简单的插入功能,没有存储数据,也没有收到错误

php - 如何使用 XAMPP 查看 phpmyadmin?

php - 需要帮助创建触发器 phpmyadmin

php - Bitnami 上预安装的 Magento(或其他 Magento 安装程序)中的示例数据安装