Solved

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

Posted on 2007-03-26
7
7,925 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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 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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

830 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