初始化时:
FATAL ERROR: Neither host 'DB01' nor 'localhost' could be looked up with /application/mysql/bin/resolveip Please configure the 'hostname' command to return a correct hostname.
问题解决:
1、首先用cat查看/etc/hosts文件,会显示以下内容: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 可见/etc/hosts中无相应的机器名 需添加本机的ip到/etc/hosts中: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 127.0.0.1 DB01 2、使用resolveip确认是否ok #/usr/local/mysql/bin/resolveip DB01 IP address of DB01 is 127.0.0.1 说明已经OK了,再次运行mysql安装程序即可。