在做MySQL初始化时,如果机器的名不能进行反解会出现以下错误:
WARNING: The host 'node2' could not be looked up with resolveip.This probably means that your libc libraries are not 100 % compatiblewith this binary MySQL version. The MySQL daemon, mysqld, should worknormally with the exception that host name resolving will not work.This means that you should use IP addresses instead of hostnameswhen specifying MySQL privileges !
#/usr/local/mysql/bin/resolveip node2
/usr/local/mysql/bin/resolveip: Unable to find hostid for ‘node2′: host not found
处理过程如下
1. 查看机器的名
#hostanme
node2
2. 查看/etc/hosts文件
#cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
可见/etc/hosts中无相应的机器名
添ip(本机的ip) 到机器的对应到/etc/hosts中:
最终/etc/hosts内容如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain410.10.60.148 node2
3.使用resolveip确认是否ok
#/usr/local/mysql/bin/resolveip node2
IP address of node2 is 10.10.60.148
4. 在次运行初始化程序
cd /usr/local/mysql./script/mysql_db_install
Good luck!