Connection DB

This commit is contained in:
Mats Pape 2022-01-10 14:12:47 +01:00
parent 03dcf9e8a3
commit db77cf584c
8 changed files with 1 additions and 2 deletions

View File

@ -16,12 +16,11 @@ public class MariaDB
username="root";
pw="HappyBird1";
url="jdbc:mariadb://localhost/happybird";
url="jdbc:mariadb://localhost:3306/happybird";
driver="org.mariadb.jdbc.Driver";
try {
Class.forName(driver);
con=DriverManager.getConnection(url, username, pw);
st= (Statement) con.createStatement();
System.out.println("Connection is successful");
} catch (Exception e) {
System.out.println("Fehler in der Verbindung");