You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/04/22 21:31:40 UTC

[OT] urgent OT w/ mysql

I am using the mysql connector for JDBC on my webhost.  I have
access to a database, but only with with credentials to access the
database from the host 'localhost'.  When the connector tries to
establish a connection, I get back the message

Invalid authorization specification: Access denied for user: 'user@localhost.localdomain' (Using password: YES)

The problem is, my user does not have access to
'localhost.localdomain', only 'localhost' and the web host cannot make
this change for just me.  It seems utterly stupid that if I specifiy
'localhost' in the jdbc connection uri it tries to use
'localhost.localdomain'.  This is on a redhat 7.3 machine.  Has anyone
else who has run into this issue come up with a work around?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"Personally, I'm not finding Windows 
to be less expensive to administer, 
but those security holes--that'll kill 'em," 
-- Al Gillen, IDC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] urgent OT w/ mysql

Posted by Dan Allen <da...@mojavelinux.com>.
Dan Allen (dan@mojavelinux.com) wrote:

> I am using the mysql connector for JDBC on my webhost.  I have
> access to a database, but only with with credentials to access the
> database from the host 'localhost'.  When the connector tries to
> establish a connection, I get back the message
> 
> Invalid authorization specification: Access denied for user: 'user@localhost.localdomain' (Using password: YES)
> 
> The problem is, my user does not have access to
> 'localhost.localdomain', only 'localhost' and the web host cannot make
> this change for just me.  It seems utterly stupid that if I specifiy
> 'localhost' in the jdbc connection uri it tries to use
> 'localhost.localdomain'.  This is on a redhat 7.3 machine.  Has anyone
> else who has run into this issue come up with a work around?

Okay, I have the solution for this.  In the /etc/hosts on redhat,
the entry has to be

127.0.0.1 localhost localhost.localdomain

rather than the reverse

127.0.0.1 localhost.localdomain localhost

The idea here is that the primary host name should be 'localhost'
and the alias is 'localhost.localdomain' and not the other way
around.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Microsoft is not the answer, it is the question. 
The answer is NO!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] urgent OT w/ mysql

Posted by Dan Allen <da...@mojavelinux.com>.
struts@daydream.stanford.edu (struts@daydream.stanford.edu) wrote:

> How about just using the ip address: 127.0.0.1

It still doesn't work, since internally mysql is looking up the host
for the name and returning the fully qualified domain name.  I have
tried many combinations and there is no way to connect with the
incorrect /etc/hosts file unless the mysql users are updated to use
'localhost.localdomain' instead of 'localhost'.  By modifying the
/etc/hosts file it becomes a non-issue.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
There is no such thing as a casual knowledge of xslt, either 
you know everything about it or you are sitting in the creek.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] urgent OT w/ mysql

Posted by st...@daydream.stanford.edu.
How about just using the ip address: 127.0.0.1

Oscar

On Tue, 22 Apr 2003, Dan Allen wrote:

> I am using the mysql connector for JDBC on my webhost.  I have
> access to a database, but only with with credentials to access the
> database from the host 'localhost'.  When the connector tries to
> establish a connection, I get back the message
> 
> Invalid authorization specification: Access denied for user: 'user@localhost.localdomain' (Using password: YES)
> 
> The problem is, my user does not have access to
> 'localhost.localdomain', only 'localhost' and the web host cannot make
> this change for just me.  It seems utterly stupid that if I specifiy
> 'localhost' in the jdbc connection uri it tries to use
> 'localhost.localdomain'.  This is on a redhat 7.3 machine.  Has anyone
> else who has run into this issue come up with a work around?
> 
> Dan
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org