updated to mysql-connector-python

This commit is contained in:
srikar committed 2026-09-27 10:36:18 -07:00
1 parent 65691a0aee
commit 4bc9b87317
6 files changed
+80 -68

No files matched your search

+7 -2
View File
@@ -5,12 +5,17 @@ Connection settings are read from environment variables first, falling back
to the defaults below (which match the assignment's requirements). This
means you can run the app as-is, or override any value like:
DB_HOST=10.0.1.40 DB_USER=root DB_PASSWORD=secret python3 main.py
DB_HOST=10.10.0.160 DB_USER=root DB_PASSWORD=secret python3 main.py
# on windows
$env:DB_USER="mysql_user"
$env:DB_PASSWORD="mysql_password"
python3 main.py
"""
import os
DB_HOST = os.environ.get("DB_HOST", "10.0.1.40")
DB_HOST = os.environ.get("DB_HOST", "10.10.0.160")
DB_PORT = int(os.environ.get("DB_PORT", "3306"))
DB_USER = os.environ.get("DB_USER", "root")
DB_PASSWORD = os.environ.get("DB_PASSWORD", "")