当前位置:Gxlcms > mysql > MySQLERROR解决及MySQL配置说明

MySQLERROR解决及MySQL配置说明

时间:2021-07-01 10:21:17 帮助过:22人阅读

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

人气教程排行