15 lines
326 B
Python
15 lines
326 B
Python
import mysql.connector
|
|
|
|
try:
|
|
conn = mysql.connector.connect(
|
|
host="localhost",
|
|
user="corey",
|
|
password="41945549",
|
|
database="controls",
|
|
port=3306,
|
|
connection_timeout=5,
|
|
)
|
|
print("Connected!")
|
|
conn.close()
|
|
except Exception as e:
|
|
print(f"Connection failed: {e}") |