Linux 初始化MySQL數(shù)據(jù)庫報localhost.localdomain錯誤的解決辦法
2018-10-15 11:22:17
12912
Linux 初始化MySQL數(shù)據(jù)庫報localhost.localdomain錯誤的解決辦法
在Linux CentOS 5 中安裝完MySQL (server、devel)之后進(jìn)行初始化
service mysqld start ,執(zhí)行命令報錯:
Neither host 'localhost.localdomain' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
錯誤:
解決辦法
查看/etc/hosts,內(nèi)容如下:
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
將::1修改為127.0.0.1后,就能啟動成功了。