首頁 >資料庫 >mysql教程 >MySQL ERROR解决及MySQL配置说明

MySQL ERROR解决及MySQL配置说明

WBOY
WBOY原創
2016-06-07 16:40:081639瀏覽

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