test.py hinzugefügt

This commit is contained in:
2025-11-12 11:47:01 +00:00
parent 8310d32133
commit e983f47327

13
test.py Normal file
View File

@@ -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)