Hi,
I am trying to use st.connection
by putting the config for mysql in .streamlit/secrets.toml
as described here: st.connections.SQLConnection - Streamlit Docs.
Here is the directory:
src/
app.py
.streamlit/
secrets.toml
pages/
reports.py
secrets.toml:
[connections.mydb]
dialect = "mysql"
port = 3306
username = "root"
passord = "pwd"
host = "localhost"
database = "mydb"
reports.py
import streamlit as st
conn = st.connection("mydb")
Getting error: StreamlitAPIException: Missing SQL DB connection configuration. Did you forget to set this in secrets.toml
or as kwargs to st.connection
?
Can someone help?