Solved

Please configure the 'hostname' command to return a correct hostname. Cannot start mysql

Posted on 2007-03-26
7
7,832 Views
Last Modified: 2013-12-16
I am trying to get Mysql to run on Fedora Core 6. The error that I keep getting when attempting to start mysqld is the following:

login as: root
root@192.168.5.32's password:
Last login: Mon Mar 26 04:33:34 2007 from tsuadmin.chpd.townofchapelhill.org
[root@Intranet ~]# cd /
[root@Intranet /]# cd etc
[root@Intranet etc]# vi hosts
[root@Intranet etc]# service mysqld start
Initializing MySQL database:  Neither host 'Intranet' 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]
[root@Intranet etc]# service mysqld start --force
Initializing MySQL database:  Neither host 'Intranet' nor 'localhost' could be l
/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]
[root@Intranet etc]# vi hosts
[root@Intranet etc]# service mysqld start
Initializing MySQL database:  Neither host 'Intranet' nor 'localhost' could be l
/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]
[root@Intranet etc]# service mysqld start --force
Initializing MySQL database:  Neither host 'Intranet' nor 'localhost' could be l
/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]
[root@Intranet etc]# vi hosts
[root@Intranet etc]# service mysqld start
Initializing MySQL database:  Neither host 'Intranet' nor 'localhost' could be l
/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]


service mysqld start
Initializing MySQL database:  Neither host 'Intranet' 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]

I have checked resolv.conf to ensure that the domain name is correct and I have checked the contents of the hosts file as well. The contents of the hosts file is:

127.0.0.1 Intranet

I even tried :

127.0.0.1 Intranet localhost.localdomain localhost

Any help would be great. Thanks.
0
Comment
Question by:valicon
7 Comments
 
LVL 6

Expert Comment

by:_iskywalker_
ID: 18792821
what says uname -a
0
 
LVL 12

Author Comment

by:valicon
ID: 18792858
uname -a
Linux Intranet 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
0
 
LVL 9

Expert Comment

by:kfullarton
ID: 18793277
Is the IP address of the server 192.168.5.32?  You should probably add that to /etc/hosts.  What is the result when you execute the hostname command?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Author Comment

by:valicon
ID: 18793324
Solved by running:

scripts/mysql_install_db --force

http://bugs.mysql.com/bug.php?id=4354
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 18796353
Tour hosts file should have

127.0.0.1 localhost

Anything else is incorrect.
0
 
LVL 1

Accepted Solution

by:
Vee_Mod earned 0 total points
ID: 19084449
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

13 Experts available now in Live!

Get 1:1 Help Now