| View previous topic :: View next topic |
| Author |
Message |
frperalta1 Newbie

Joined: 05 Aug 2004 Posts: 2
|
Posted: Thu Aug 05, 2004 7:51 am Post subject: Unable to Connect Using JDBC |
|
|
I have followed the instructions on different postings but have not had any success.
Every time I click on the Tables tab I keep getting the following error message and I don't know where to start with this, please help:
Unable to connect to any hosts due to exception: java.net.UnknownHostException: localhost
** BEGIN NESTED EXCEPTION **
java.net.UnknownHostException
MESSAGE: localhost
STACKTRACE:
java.net.UnknownHostException: localhost
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:220)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
at com.mysql.jdbc.Connection.<init>(Connection.java:440)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
** END NESTED EXCEPTION ** |
|
| Back to top |
|
 |
Lysander Newbie

Joined: 11 Aug 2004 Posts: 2
|
Posted: Wed Aug 11, 2004 1:23 am Post subject: |
|
|
Hello,
the error message tells you what is wrong: The Computer "localhost" cannot be resolved - you must set a real ip-adress like 127.0.0.1. I had the same problem - but i never found any solution for it at forums, docs, ... so I hope it will help you!
Ciao,
Lysander |
|
| Back to top |
|
 |
frperalta1 Newbie

Joined: 05 Aug 2004 Posts: 2
|
Posted: Thu Aug 12, 2004 4:26 am Post subject: |
|
|
| Thanks for your reply! How do you "set a real ip-adress like 127.0.0.1"? I guess I am a real newbie. |
|
| Back to top |
|
 |
Lysander Newbie

Joined: 11 Aug 2004 Posts: 2
|
Posted: Thu Aug 12, 2004 11:22 am Post subject: |
|
|
Instead of "localhost" you write 127.0.0.1 or 192.168.0.1 or something like that! Just replace the localhost string by the IP string.
Ciao,
Lysander |
|
| Back to top |
|
 |
|