|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
localhost != 127.0.0.1. How to resolve localhost on a network?
Hey,
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. See: Code:
"... javax.servlet.ServletException: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'javauser@192.168. ..." Can someone educate me on this?
__________________
http://dhtmlkitchen.com/ |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > localhost != 127.0.0.1. How to resolve localhost on a network? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|