Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final static Connection ConexionMysql()
- {
- String user = "root";
- String password = "sql-pto";
- Connection conn = null;
- try {
- Class.forName("com.mysql.jdbc.Driver");
- conn=DriverManager.getConnection("jdbc:mysql://localhost/dsad","root","toor");
- System.out.println("conexion establecida");
- } catch (SQLException ex) {
- } catch (ClassNotFoundException ex) {
- Logger.getLogger(MySQL.class.getName()).log(Level.SEVERE, null, ex);
- }
- return conn;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement