首页  >  文章  >  数据库  >  MySQL ERROR解决及MySQL配置说明

MySQL ERROR解决及MySQL配置说明

WBOY
WBOY原创
2016-06-07 16:40:081613浏览

1.MySQL ERROR 1042 (HY000): Cant get hostname for your address 远程无法连接MySQL了,提示错误如下: ERROR 1042 (HY000): Can't get hostname for your ad[root@localhost ~]# mysql -h 192.168.1.10 -u root -pEnter password:ERROR 1042 (HY000): Can

1.MySQL ERROR 1042 (HY000): Can’t get hostname for your address

远程无法连接MySQL了,提示错误如下:

ERROR 1042 (HY000): Can't get hostname for your ad
[root@localhost ~]# mysql -h 192.168.1.10 -u root -p
Enter password:
ERROR 1042 (HY000): Can't get hostname for your address

//解决办法:添加配置文件

在配置文件/etc/my.cnf中插入以下语句。
[mysqld]
skip-name-resolve

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn