You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
468 B
17 lines
468 B
|
4 years ago
|
package com.kuajbang.db;
|
||
|
|
|
||
|
|
import java.sql.Connection;
|
||
|
|
import java.sql.DriverManager;
|
||
|
|
import java.sql.SQLException;
|
||
|
|
|
||
|
|
public class db extends Exception {
|
||
|
|
Connection con() throws SQLException, ClassNotFoundException {
|
||
|
|
Class.forName("com.mysql.jdbc.Driver");
|
||
|
|
String url = "jdbc:mysql:///175.178.172.201:3306/db";
|
||
|
|
String user = "root";
|
||
|
|
String password = "adiao";
|
||
|
|
return DriverManager.getConnection(url, user, password);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|