jdbc:mysql://[hostname][:port]/dbname[?param1=value1][=value2]...
... try {
Connection C = DriverManager.getConnection(
"jdbc:mysql://localhost/test?user=monty=greatsqldb");
// Do something with the Connection
....
}
catch (SQLException E) {
System.out.println("SQLException: " + E.getMessage());
System.out.println("SQLState: " + E.getSQLState());
System.out.println("VendorError: " + E.getErrorCode());
}
... try {
Connection C = DriverManager.getConnection(
"jdbc:mysql://localhost/test?user=monty=greatsqldb");
// Do something with the Connection
....
}
catch (SQLException E) {
System.out.println("SQLException: " + E.getMessage());
System.out.println("SQLState: " + E.getSQLState());
System.out.println("VendorError: " + E.getErrorCode());
}
解决方案 »
- birt报表错误,org.eclipse.birt.report.data.oda.jdbc.JDBCException:
- 关于<html:javascript>标签 大拿进来
- requst对象如何获取请求地址的域名
- extjs tree的问题,希望有人可以解答~~
- 为什么Bean或者一些自定义的类一定要放到包里呢?是Classpath的关系?
- 如何截获AJAX传送的目的地址?
- 飞鱼编辑器和struts2一起用怎么就有问题,请高手解答
- 关于页面回退数据保存的问题。请帮高手指点。谢谢
- 有关下载的送分题
- 惨了,公司的javaweb项目要求在页面上播放mid格式,咋整?
- 如何在jsp中使用activex?
- jsp的页面跳转问题?
gConStr=jdbc:mysql://192.168.90.59/dbname