Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
phpMyAdmin-won';“不要停止投掷”#1130-主机';本地主机';不允许连接到此MySQL服务器";_Mysql_Database_Phpmyadmin_Privileges - Fatal编程技术网

phpMyAdmin-won';“不要停止投掷”#1130-主机';本地主机';不允许连接到此MySQL服务器";

phpMyAdmin-won';“不要停止投掷”#1130-主机';本地主机';不允许连接到此MySQL服务器";,mysql,database,phpmyadmin,privileges,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 My

我正在尝试输入
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.
我试着去做写的事,但是什么都不管用

我如何修复这个恼人的消息

致意

编辑:

run
I点击
cmd
C:\Users\internet>“C:\Program Files\MySQL\MySQL Server 5.5\bin\MySQL.exe”-def
aults file=C:\ProgramData\MySQL\MySQL服务器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

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