Solved

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

Posted on 2007-03-26
7
7,973 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
Industry Leaders: 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 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

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…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 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