Solved

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

Posted on 2007-03-26
7
8,029 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
[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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 35

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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.:

617 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