LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-19-2005, 10:08 PM   #1
Dark Severance
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Rep: Reputation: 0
localhost.localdomain and mySQL?


I recently used navicat to manage my mySQL databases. I was messing around and creating a java interface to access the database. From a command line I can do just fine but when I boot up the script I get the following error:
Code:
Host 'localhost.localdomain' is not allowed to connect to this MySQL server
When I created my database in Navicat I called the connection name: localhost and the Host Name/IP Address was also called localhost. I tried to find out about the error and from what I've seen Linux has an issue using localhost. Is this true and I have to change the localhost to use 127.0.0.1? Or is there something else going on that could be causing this issue?
 
Old 04-20-2005, 12:39 AM   #2
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
MySQL can be very particular about the hostnames used. I'd suggest you look around for any area n configuration of the client where localhost.localdomain maybe used.
 
Old 04-21-2005, 01:21 PM   #3
cowboy_jake
Member
 
Registered: Apr 2005
Location: Texas
Distribution: RHEL 2.1,3.0,4.0
Posts: 39

Rep: Reputation: 15
I think there's a few different ways you could attack this one. Try one of these...

1. Type "hostname" at the shell prompt. If it comes back as "localhost.localdomain" rather than "localhost" type "hostname localhost" at a root prompt. This solution won't be persistent after a reboot.

2. Type "hostname" at the shell prompt. If it comes back as "localhost.localdomain" rather than "localhost" change your /etc/hosts file to read "127.0.0.1 localhost locahost.localdomain"

3. Check /etc/sysconfig/network and see what the HOSTNAME parameter is set to. If it's "localhost.localdomain" set it to "localhost"

4. The row in the mysql.user table probably says "localhost" in the host column. You could try changing that to "localhost.localdomain" or adding a duplicate of the row and setting host to "localhost.localdomain"
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
localhost name localdomain name assyrian1 Linux - Newbie 9 07-05-2005 04:17 AM
localhost.localdomain hansi umayangan Linux - General 3 12-23-2004 04:10 AM
localhost.localdomain d1ny3 Mandriva 2 04-17-2004 08:27 PM
what is localhost.localdomain? boicraig Linux - Software 3 01-11-2003 06:57 PM
localhost.localdomain blankx87@m-i-m. Linux - Newbie 1 11-17-2002 04:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration