Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 17:52:31
Original
2154 people have browsed it

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服务,问题得到解决。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template