WARNING: The host '$hostname' could not be looked up with resolveip. (转)

Posted JUST DO IT

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WARNING: The host '$hostname' could not be looked up with resolveip. (转)相关的知识,希望对你有一定的参考价值。

环境介绍:CentOS6.X
mysql版本:5.5.X以上
执行scripts/mysql_install_db脚本时,抛出一条Warning,主机名和IP地址无法解析;
技术分享

The host ‘$hostname‘ could not be looked up with resolveip.
随即仔细检查了这个脚本文件
在327行至351行发现了这个告警信息的代码;

技术分享
解决办法:
把主机名和IP对应关系写入/etc/hosts里面即可
#echo "172.27.1.78 mysql78" >> /etc/hosts
单独调用330行命令测试
# ./bin/resolveip mysql78
IP address of mysql78 is 172.27.1.78
至此这个问题就解决,如果不放心,可再次执行这个脚本做验证

















以上是关于WARNING: The host '$hostname' could not be looked up with resolveip. (转)的主要内容,如果未能解决你的问题,请参考以下文章

Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of kn

Warning: Permanently added the RSA host key for IP address ‘13.250.177.223‘ to the list of known(代码片

WARNING: The host 'db01' could not be looked up with /data/mysql/bin/resolveip. This probabl

Permanently added the RSA host key for IP address '192.30.253.113' to the list of known host

关于fastapi开启多个服务实例时遇到WARNING: You must pass the application as an import string to enable 'reloa

转 解决Centos6.5中ssh登录时Warning:Permanently added (RSA) to the list of known hosts的警告