Cannot Connect to AWS RDS mysql database using Alembic #959
Unanswered
fazal-kh4n
asked this question in
Usage Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to use Alembic in my existing project. My current project uses an AWS RDS MySql database.
Using DBeaver, I can connect to the database fine using the following connection string:
I am now trying to set up Alembic in my project folder. To do this I ran the following commands:
alembic init alembic
alembic revision --autogenerate -m "gen"
However this throws the following error:
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'mydatabaseblahblah.rds.amazonaws.com' (timed out)"
In terms of my env.py file I have the following:
My alembic.ini file:
Can someone please explain how I may connect to AWS RDS MySql? I can't seem to see where I am going wrong.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions