package unsch.efpis.ConexionDB;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
*
* @author sin_querer
*/
public class Conexion {
private static Connection cn = null;
private static String URL = "jdbc:mysql://localhost:3306/mydb";
private static String usuario = "root";
private static String contrasena = "123456";
public static Connection getConexion() throws SQLException {
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
cn = DriverManager.getConnection(URL, usuario, contrasena);
return cn;
}
}