Secerts.toml not found

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?

FYI, I tried adding the /<userprofile>/.streamlit/secrets.toml and it was able to find the secrets.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.