Or grant privileges on the database to 'x'@'localhost' and 'x'@'localhost.localdomain'. Then give both accounts the same password. It won't matter which one mysql sees because they'll both work.

For the record, mysql does a reverse lookup of the host and makes that part of the credentials matching it up with the host field in the mysql.user table. I suppose you could use 'x'@'localhost%', but what's to stop some fool from naming his system 'localhost-spoof.mydomain.com' and attempting a hack.

--David

Pawson, David wrote:

After chasing for a day, a nasty arose I thought
others might like to know of.

rhel has /etc/hosts localhost entry as

127.0.0.1   localhost.localdomain localhost


If you use form authentication, with server.xml entries such as

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="0" driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost/tcusers"
connectionName="tomcat" connectionPassword="shhhh"
userTable="x" userNameCol="y" userCredCol="z"


              />



then the connection is most likely to fail, not allowed, mysql error indicating
that this user is invalid as [EMAIL PROTECTED]

reverse the /etc/hosts entry such that localhost is found first
and it works.

127.0.0.1    localhost localhost.localdomain

Sheesh.



regards DaveP.

** snip here **








Regards DaveP.

**** snip here *****




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to