Sortinbg DriverManager

try

{

Properties prop = new Properties();

prop.setProperty("user","root");

prop.setProperty("password","secret");

try

{

Class.forName(

"com.mysql.jdbc.Driver");

}

catch (Exception e)

{

System.out.println(e.toString());

}

Connection conn =

DriverManager.getConnection

("jdbc:mysql//localhost:3306",

prop);

System.out.println("Got Connection");

It runs through this but the Connection line causes an exception still. I'm not sure it should be pointing to something on my machine?

sorry.

[615 byte] By [burntcandlea] at [2007-11-27 6:23:19]
# 1

> I'm not sure it should be pointing to something on my machine?

Then you should certainly find out. Ask the person responsible for this MySQL server where the server is running. If it's running on your machine, they should be able to tell you that. Otherwise they should be able to tell you what machine it is running on.

DrClapa at 2007-7-12 17:41:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Thanks. Got it sorted now. Just not that good at documentation (yet)?
burntcandlea at 2007-7-12 17:41:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...