MySQLと/etc/hosts
以前VMwareに入れたFedora Core 6でMySQLを使うためデーモンを起動しようとしたらエラーが出た。
$ sudo /etc/init.d/mysqld start MySQL データベースを初期化中: 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 [失敗]
/etc/hostsには
# Do not remove the following line, or various programs # that require network functionality will fail. ::1 localhost.localdomain localhost
としか書いてなかったため、IPv4で解決できなかったということだろうか。試しに、
127.0.0.1 localhost.localdomain localhost
を追加してみると無事起動。よかったよかった。