Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Config;
- import java.sql.*;
- public class Conexion {
- Connection con;
- public Conexion(){
- try {
- Class.forName("com.mysql.jdbc.Driver");
- con=DriverManager.getConnection("jdbc:mysql://localhost:3306/registro","root","***");
- } catch (Exception e) {
- System.err.println("Error"+e);
- }
- }
- public Connection getConnection(){
- return con;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement