Forums Register Login

how to express Database url properly??

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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
Hang a left on main. Then read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 832 times.
Similar Threads
MySQL & JDBC
how to connect MySql
JDBC BEAN AND SOURCE
Help...JSP, MySql, and JDBC
JDBC Connectivity problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:22:49.