You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
520 B
26 lines
520 B
import mariadb
|
|
import sys
|
|
|
|
# Connect to MariaDB Platform
|
|
try:
|
|
conn = mariadb.connect(
|
|
user="root",
|
|
password="KyKvMdRt586591!*",
|
|
host="db.keydev.me",
|
|
port=3306,
|
|
database="minibase_projects"
|
|
)
|
|
except mariadb.Error as e:
|
|
print(f"Error connecting to MariaDB Platform: {e}")
|
|
sys.exit(1)
|
|
|
|
# Get Cursor
|
|
cur = conn.cursor()
|
|
|
|
cur.execute("SELECT name, description FROM project")
|
|
|
|
print(cur)
|
|
|
|
for (name, description) in cur:
|
|
print(f"Name : {name}, What: {description}")
|