Connect Streamlit to MySQL | How to connect Streamlit to XAMPP MySQL Database | Part 3

preview_player
Показать описание

Learn how to build dynamic web applications by connecting Streamlit, a powerful Python library, to a XAMPP MySQL database. In this tutorial, we'll guide you through the process of setting up XAMPP, creating a MySQL database, and establishing a connection with Streamlit. You'll discover how to execute SQL queries, fetch data from the database, and display it in real-time using Streamlit's intuitive UI components. Whether you're a beginner or an experienced developer, this step-by-step tutorial will empower you to create interactive web apps that interact with your MySQL database. Get ready to unleash the potential of Streamlit and take your web development skills to the next level!

dialect = "mysql"
host = "localhost"
port = 3306
database = "xxx"
username = "xxx"
password = "xxx"

Copy the code below to your Streamlit app and run it. Make sure to adapt query to use the name of your table.

import streamlit as st

Join this channel to get access to perks:

Рекомендации по теме
Комментарии
Автор

How do you host this streamlit app on streamlit cloud but using your local MYSQL database only?

jageshseesar