August 26th, 2002, 07:21 PM
localhost != 127.0.0.1. How to resolve localhost on a network?
This will probably sound stupid because I don't know anything about networking. It's not even a java question, really. I almost put it in the mysql forum.
We got DSL and a router for our 2 computers at home. Now localhost maps to the ip for my computer on the router - 192.168.n.n (replace the n's with numbers).
So if I try to use localhost for anything, there is a problem. I need to explicitly use 127.0.0.1.
Can someone educate me on this?
javax.servlet.ServletException: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'firstname.lastname@example.org.
August 27th, 2002, 12:13 AM
You're right, this has nothing to do with java Try changing 'localhost' to '127.0.0.1' in your code. That'll probably fix it.
I don't know why localhost is pointing to your ethernet instead of your loopback. Most likely something played with your routing tables. Try asking in the forum for your OS and see if anyone there can shed some light on the issue.
Also, you might ask in the MySQL forum about setting up user permissions to let your connect from a remote address. I've only done that with Postgres.
August 27th, 2002, 10:07 AM
it doesn't seem that your network is correctly, as networking standards go, no ip other than 127.0.0.1 should be binded to localhost...
and trying to find localhost of another machine is not gonna
get you anywhere.