Home  >  Article  >  Database  >  MySQL报错1042-Can t get hostname for your address解

MySQL报错1042-Can t get hostname for your address解

WBOY
WBOYOriginal
2016-06-07 17:52:312151browse

MySQL报错1042-Cant get hostname for your address解决方法总结,有需要习的朋友可参考参考。

安装的mysql 5.5,发现用mysql客户端远程连接的时候,报1042-Can’t get hostname for your address错误,而连接用户已授权。这个报错的意思是“您的地址无法获得主机名”,我就想到了skip-name-resolve参数。

 

解决方法如下:

编辑my.ini
在[mysqld]节点下新增或修改如下两行行
skip-name-resolve #忽略主机名的方式访问
lower_case_table_names=1 #忽略数据库表名大小写

重启mysql服务,问题得到解决。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn