Solved

MySQL error during setup on Fedora 6

Posted on 2006-11-18
3
285 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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now