diff --git a/test.py b/test.py new file mode 100644 index 0000000..e8c8f3a --- /dev/null +++ b/test.py @@ -0,0 +1,13 @@ +from sqlalchemy import create_engine, text + +# Verbindung anpassen: +DATABASE_URL = "mysql://mariadb:r5WdORhRYOajNZ9lcn1raCWpXAhQa1v6sM5xN8JEffr2rZLDhQvAGQVfcj6f7rzf@tkgo4k84c8wgcos40kgs8ows:3306/default" + +try: + engine = create_engine(DATABASE_URL) + with engine.connect() as connection: + result = connection.execute(text("SELECT VERSION()")) + version = result.fetchone() + print("Verbindung erfolgreich. MariaDB-Version:", version[0]) +except Exception as e: + print("Fehler bei der Verbindung:", e) \ No newline at end of file