Solved

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

Posted on 2007-03-26
7
7,998 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
Webinar: MongoDB® Index Types

Join Percona’s Senior Technical Services Engineer, Adamo Tonete as he presents “MongoDB Index Types, How, When and Where Should They be Used?” on Wednesday, July 12, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

 
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…
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.

734 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