diff --git a/pages/home.py b/pages/home.py index 70ae033..7629c0a 100644 --- a/pages/home.py +++ b/pages/home.py @@ -1,6 +1,21 @@ import streamlit as st import os import base64 +import mysql.connector + +try: + # Ganti nama database sesuai dengan database Anda + conn = mysql.connector.connect( + host="localhost", + user="root", + password="", + dbname="employee_attrition_db", + port=3306 + ) + print("Koneksi ke database berhasil!") + conn.close() +except mysql.connector.Error as e: + print(f"Koneksi gagal: {e}") def show_home(): # Atur layout halaman