Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 30th October 2006, 23:51
angussf angussf is offline
Junior Member
Join Date: Mar 2006
Location: Tucson, Arizona USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to angussf Send a message via Yahoo to angussf
Default hosts/hostname and MySQL prob in "Perfect Setup - Ubuntu 6.06 LTS Server" setup

I'm trying to follow the step-by-step in "The Perfect Setup - Ubuntu 6.06 LTS Server", but when I get to the "hostname" step, something's not right. I've followed the steps on Page 3 as far as editing /etc/hosts with the static IP address and both the FQDN and the simple hostname (the relevant line is set to myserver.mydomain.ext myserver

), and /etc/hosts just reads "myserver". However, when I type "hostname" and "hostname -f" to test (as on P.3) "hostname" returns just "myserver" while "..-f" returns the FQDN version. What's wrong? I've restarted several times after making these edits (for other reasons).

root@myserver:~# cat /etc/hosts       localhost.localdomain localhost   myserver.mydomain.ext       myserver

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

root@myserver:~# cat /etc/hostname

root@myserver:~# hostname

root@myserver:~# hostname -f
I can get "hostname" to return the FQDN by editing "/etc/hostname" but then "sudo" fails.
[EDIT an hour later: NEVER MIND - by editing /etc/hosts to the FQDN and rebooting, it suddenly started working. Go figure]

Also, and this may be related to the above, I can't follow the second part of setting the MySQL root password successfully. Here's what I see:

root@myserver:~# mysqladmin -h myserver.myddomain.ext -u root password My.Pwd
mysqladmin: connect to server at 'myserver.myddomain.ext' failed
error: 'Host 'myserver.myddomain.ext' is not allowed to connect to this MySQL server'
root@myserver:~# mysqladmin -h myserver -u root password My.Pwd
mysqladmin: connect to server at 'myserver' failed
error: 'Host 'myserver.myddomain.ext' is not allowed to connect to this MySQL server'
When I run "netstatp -tap" it clearly shows mysql running with the correct domain name:
root@myserver:~# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:mysql                 *:*                     LISTEN     4796/mysqld
tcp        0      0 myserver.mydomain.ext:domain *:*                     LISTEN     3853/named
tcp        0      0 localhost:domain        *:*                     LISTEN     3853/named
tcp        0      0 *:ssh                   *:*                     LISTEN     3626/sshd
tcp        0      0 localhost:953           *:*                     LISTEN     3853/named
tcp        0      0 myserver.mydomain.ext:mysql myserver.mydomain.ext:38148 TIME_WAIT  -
I'd really appreciate suggestions or guidance here as to what I need to do to get this working.

[EDIT an hour later: NEVER MIND on this one either! -- I used dselect to remove mysql-server mysql-client and libmysqlclient12-dev and re-installed them, and this time it worked, possibly because of the above fix to /etc/hostname


Angus S-F
Tucson, AZ USA

P.S. might want to edit the HowTo to include the need to set /etc/hostname to the FQDN.

Last edited by angussf; 31st October 2006 at 02:02.
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake) Q&A NGNZ Installation/Configuration 8 13th June 2008 18:52
Ubuntu 6.06 LTS ISP Server Setup with DTC seadap06 HOWTO-Related Questions 9 23rd January 2007 19:48
Help with The Perfect Setup - Ubuntu 6.06 LTS Server LinuxNewb HOWTO-Related Questions 6 30th July 2006 14:43
Having Problems loging into Mysql Database Ubuntu 6.06 Perfect Setup badgerbox76 Installation/Configuration 2 22nd June 2006 00:00
HOWTO The Perfect Setup - Ubuntu 6.06 LTS Server mikeeblau Installation/Configuration 4 12th June 2006 15:08

All times are GMT +2. The time now is 01:58.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.