Downgrading to mysql-connector-python 9.0.0 fix this for me too thanks to TwelvePointFive comment. In my caste I was getting silent failure in venv but code was working find in global.