Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void connectToDatabaseAsClient() {
- try {
- String dbURL = "jdbc:mysql://localhost/cinematograf";
- Properties properties = new Properties();
- properties.setProperty("user", "client");
- properties.setProperty("password", "");
- properties.setProperty("useSSL", "false");
- properties.setProperty("noAccessToProcedureBodies","true");
- connection = DriverManager.getConnection(dbURL,properties);
- }
- catch (Exception exception) {
- JOptionPane.showMessageDialog(null, "Establising database connection failed", "Error", JOptionPane.ERROR_MESSAGE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement