Home >Database >Mysql Tutorial >MySQL ERROR解决及MySQL配置说明

MySQL ERROR解决及MySQL配置说明

WBOY
WBOYOriginal
2016-06-07 16:40:081639browse

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

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