I'm trying to connect to mysql using below
engine = create_engine("mysql+pymysql://user:pwd@localhost/test") connection = engine.connect()
it works while in local and when deployed the code in one of our linux box , am getting
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'xxx.xx.xx.xxx' ([Errno 13] Permission denied)")
I checked the user privileges and the user has all the necessary privileges.
using the same user and am able to connect from python terminal from the same linux box but it doesnt work using the python code.
Any suggestions if am missing anything?