I’m doing a school project and we’re supposed to make an app that connects to the database our professor gave us. The server type is MariaDB.
Assuming it works similar to MySQL and that I’ve seen guides on how to connect to MySQL servers in streamlit, I gave streamlit a try. I used the same method when connecting to MySQL servers to connect to the MariaDB server of my professor.
When I run the app, there are no errors. Just endless running of the connection initialisation to the server. Running app_func.<locals>.init_connection()
under secrets.toml, i tried enabling and disabling these two testing if these were the errors. and got no luck
Anyone else tried MariaDB servers with streamlit? or knows if MariaDB is compatible with streamlit
My streamlit app runs on streamlit server, and the MariaDB runs on the school server our prof gave us access to.
I tried connecting MySQL online database from another thirdparty site and it works. So my code is working, but the initialization to the MariaDB server isn’t.
This is correct. To the extent that we have database tutorials in the docs, it’s because someone wrote them, not that Streamlit allows/disallows any given database.
Problems of this nature are frequently due to firewall access or other networking security issues, there is nothing on the Streamlit core Python side or Streamlit Cloud that specifically disallows MariaDB.
Thank you. The issue was on the database server’s end not trusting streamlit’s IP so I had to request to allow streamlit’s stable outbound IP addresses to be whitelisted.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.