Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

java mysql

// You need to add MySQL Connector to your dependencies

// Database address
String url = "jdbc:mysql://localhost:3306/falconbyte";
String user = "root";
String pass = "";

try {
    // Connect
    Connection con = DriverManager.getConnection(url, user, pass);
    System.out.println("Verbindung erfolgreich hergestellt");
} catch (SQLException e) {
    System.out.println(e.getMessage());
}
Source by falconbyte.net #
 
PREVIOUS NEXT
Tagged: #java #mysql
ADD COMMENT
Topic
Name
7+8 =