For When You Can't Have The Real Thing
[ start | index | login ]
start > mysql > Tomcat Connections

Tomcat Connections

Created by dave. Last edited by dave, 17 years and 183 days ago. Viewed 2,667 times. #1
[edit] [rdf]


An apache Tomcat application could not connect to the mysql database. The user was defined as username@localhost.

The error displayed was:

"#HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server"


Ensure that in /etc/hosts, the localhost name is in as:  localhost localhost.localdomain

The resolver picks the first match; if the entry for localhost has localhost.localdomain as the first name associated with the IP address, then this is the name returned during reverse lookups. So you must either fix things so that the short name is first, or redefine all your users to be username@localhost.localdomain.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt