package com.duo;
import java.sql.Connection;
import java.sql.DriverManager;
import org.junit.Test;
public class Lianjie {
@Test
public void ceshi() throws Exception{
String url="jdbc:mysql://localhost:3306/mytest";
String diverString="com.mysql.jdbc.Driver";
String nameString="root";
String password="orcl";
Class.forName(diverString);
Connection connection=DriverManager.getConnection(url, nameString, password);
System.out.println(connection);
}
}