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
192.168.0.109 andylinux
2、使用resolveip确认是否ok
#/usr/local/mysql/bin/resolveip andylinux
IP address of andylinux is 192.168.0.109
说明已经OK了,再次运行mysql安装程序即可。