Mysql baslatildiginda asagidaki gibi bir hata alinirsa eger;
[root@localhost ~]# service mysqld start
Initializing MySQL database: Neither host ‘localhost.localdomain’ nor ‘localhost’ could be looked up with /usr/bin/resolveip
Please configure the ‘hostname’ command to return a correct hostname. If you want to solve this at a later stage, restart this script with the –force option [FAILED]
Hatanin sebebi /etc/hosts dosyasindaki kaydin IP6 icin girilmis olmasi. IP4 icin kaydin girilmesi gerekir. Bunun icin
# cat /etc/hosts
::1 localhost.localdomain localhost
# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
#
Asagidaki sed komutu ile sorun cozulebilir.
# sed -i 's/::1/127.0.0.1/' /etc/hosts
Mysql yeniden baslatilmalidir.
# service mysqld start