Host '127.0.0.1' is not allowed to connect to this MySQL server

Posted 幕三少

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Host '127.0.0.1' is not allowed to connect to this MySQL server相关的知识,希望对你有一定的参考价值。

错误:Host  ‘127.0.0.1‘  is  not  allowed  to  connect  to  this  mysql  server

一般原因: MySQL数据库的配置文件my.ini中设置了参数: skip-name-resolve
        从而导致使用“localhost”不能连接到数据库。

解决方法: 注释掉: #skip-name-resolve

    注释掉对数据库的设置略有影响,但影响不大。

以上是关于Host '127.0.0.1' is not allowed to connect to this MySQL server的主要内容,如果未能解决你的问题,请参考以下文章