Solved

MySQL error during setup on Fedora 6

Posted on 2006-11-18
3
288 Views
Last Modified: 2013-12-06
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?
0
Comment
Question by:akalbfell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 300 total points
ID: 17970818
what /etc/sysconfig/network file shows as HOSTNAME
Should have valid hostname with full domain eg.
my_host.mydomain.tld

It does not have to be real, just make sure, that /etc/hosts file contains entry
1.2.3.4 my_host my_host.mydomain.tld
127.0.0.1 localhost localhost.localdomain
where 1.2.3.4 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
0
 
LVL 8

Author Comment

by:akalbfell
ID: 17972111
all that info can be bs? i can use test123.com domain or something and it wont matter?
0
 
LVL 14

Assisted Solution

by:ygoutham
ygoutham earned 200 total points
ID: 18003757
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 127.0.0.1 by default.  when it does not find a corresponding ip address for loclahost, you get the error.

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

that should finish the errors off...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why  my code (program) build with old compiler? 11 141
can i read my emails on lamp ftp 4 66
Edit smb.conf-file in Samba om a ReadyNAS 3 66
http response code 3 28
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question