Erster Code für die DB

This commit is contained in:
2021-12-20 20:40:08 +01:00
parent 5e57dfa022
commit 76eb6214d1
12 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.example.happy_bird;
import java.beans.Statement;
import java.sql.*;
public class MariaDB
{
public String username;
public String pw;
public String url;
public String driver;
Connection con;
Statement st;
public MariaDB()
{
try {
con = DriverManager.getConnection("jdbc:mariadb://localhost:3306/DB?user=root&password=HappyBird1");
} catch (SQLException e) {
e.printStackTrace();
}
}
}