Runs on local mysql but not, when i use Cloud mysql

It runs well when i use my local mysql,but when i use streamlit cloud and cloud mysql(don‘t use mysql-connector-python and secrets management),there are some weird erorrs,which make the code logic change(such as sudden return)

Without seeing your code or the specific error messages, we cannot give any advice at all, based on these vague descriptions.