Errors

my app: GitHub - jteodosio566/CleverCloudPatents

Hi @jteodosio566, welcome to the community! :wave:

I think the actual connector package you need to include in your requirements.txt is:

mysql-connector-python

Source: Connect Streamlit to MySQL - Streamlit Docs

https://jteodosio566-clevercloudpatents-st-technext-1roviu.streamlitapp.com/

IT WORKED, I F LOV U BRO

1 Like

I’m going here in a tangent, but shouldn’t these credentials be hidden in the streamlit secrets rather than written down in the code? (Secrets management - Streamlit Docs)

Something like this instead of how it is currently implemented (lines 5 to 10 here in the project file) :

mydb = mysql.connector.connect(
  host=st.secrets["db_host"],
  user=st.secrets["db_username"],
  password=st.secrets["db_password"],
  database=st.secrets["db_database"])
1 Like