a year ago
I am trying to connect my app to MySQL using SQLAlchemy and PyMySQL, but I am encountering this error: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'mysql.railway.internal' ([Errno -2] Name does not resolve)") (Background on this error at: https://sqlalche.me/e/20/e3q8)
I have removed the Public Networking domain and am using the following URL to connect: mysql+pymysql://:@mysql.railway.internal:/
> ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
a year ago
Hello,
The private network is not available during build.
If you're trying to run migrations, please do that in a pre-deploy command instead -
https://docs.railway.com/guides/pre-deploy-command
Best,
Brody
brody
Hello,The private network is not available during build.If you're trying to run migrations, please do that in a pre-deploy command instead -https://docs.railway.com/guides/pre-deploy-commandBest,Brody
a year ago
Hello,
Thank you so much! I fixed the code.
Hope you have a nice day!