16 lines
472 B
Java
16 lines
472 B
Java
package com.mycompany.ticketcine;
|
|
|
|
import java.sql.Connection;
|
|
import java.sql.DriverManager;
|
|
import java.sql.SQLException;
|
|
|
|
public class DatabaseConnection {
|
|
private static final String URL = "jdbc:mysql://localhost:3306/cine";
|
|
private static final String USER = "root";
|
|
private static final String PASSWORD = "4560";
|
|
|
|
public static Connection getConnection() throws SQLException {
|
|
return DriverManager.getConnection(URL, USER, PASSWORD);
|
|
}
|
|
}
|