phpMyAdmin不会停止抛出“#1130-不允许主机'localhost'连接到该MySQL服务器" [英] phpMyAdmin won't stop throwing "#1130 - Host 'localhost' is not allowed to connect to this MySQL server "

查看:86
本文介绍了phpMyAdmin不会停止抛出“#1130-不允许主机'localhost'连接到该MySQL服务器"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to enter http://localhost/phpmyadmin/index.php but I keep getting :

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.

我已经尝试做此处以及此处最后但并非最不重要的-在这里,但是没有任何效果.

I've tried to do what's written here , and here , and also here , and last but not least - here , however nothing works .

如何解决此烦人的消息?

How can I fix this annoying message ?

最好的问候

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"

From run I hit cmd and 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"

那我就在:

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.

Since the host that is lacking is localhost and not 127.0.0.1.

这篇关于phpMyAdmin不会停止抛出“#1130-不允许主机'localhost'连接到该MySQL服务器"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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