• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

MySQL error during setup on Fedora 6

during the install process, when i run the mysql_install_db command i get a message saying

Neither host 'localhost.localdomain' nor 'localhost' could be looked up with /usr/local/mysql/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

What does this error mean and how do i correct it?
2 Solutions
what /etc/sysconfig/network file shows as HOSTNAME
Should have valid hostname with full domain eg.

It does not have to be real, just make sure, that /etc/hosts file contains entry my_host my_host.mydomain.tld localhost localhost.localdomain
where is the IP You gave to Your machine

After You made the changes issue: /etc/init.d/networking restart

Or simply force mysql to intall initial db: mysql_install_db --force
akalbfellAuthor Commented:
all that info can be bs? i can use test123.com domain or something and it wont matter?
as said in the post above, you just need a entry for localhost.localdomain and localhost

what you put in the /etc/hosts file is only a "dummy" entry. it need not be a fully qualified domain name (an ISP registered domain like google.com or something).  you can have any domain name. test123 is just fine.

mysql when it installs the initial db, it creates a file with localhost and ipaddress by default.  when it does not find a corresponding ip address for loclahost, you get the error.

in short, edit /etc/hosts
*************      localhost.localdomain     localhost          mydomain.com   mydomain

that should finish the errors off...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now