This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to express Database url properly??

 
Caven Wang
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jdbc to connect database in an applet(on the same machine, ip is 202.96.193.122):
method1 works: sqlConn=java.sql.DriverManager.getConnection ("jdbc:mysql://localhost:3306/resource?user=caven;password='winner'");
method2 goes wrong:
sqlConn=java.sql.DriverManager.getConnection ("jdbc:mysql://202.96.193.122:3306//resource?user=caven&password='winner'");

why?
 
Maki Jav
Ranch Hand
Posts: 445
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You will use the address of localhost and not your ip address
your localhost address is 127.0.0.1
I hope you get it right this time
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic