2 years ago
im not sure whats wrong as my code was working up until yesterday but today i started getting this error
Error connecting to MySQL database: 2005 (HY000): Unknown MySQL server host 'swi.railway.internal' (-2)
the server is correct
self.connection = mysql.connector.connect(
host=RAILWAYPRIVATEDOMAIN,
user=MYSQLUSER,
password=MYSQLPASSWORD,
database=MYSQLDATABASE
)
9 Replies
2 years ago
swissm.railway.internal
2 years ago
it used to be
mysql.railway.internal but that stopped working for the same reason, so i switched it to swissm.railway.internal and it worked for a bit but then it stopped working again
2 years ago
Please attach a screenshot of the private domain for the MySQL service, not your app's service.
2 years ago
i am
but its not working
2 years ago
im not sure whats wrong as my code was working up until yesterday but today i started getting this error Error connecting to MySQL database: 2005 (HY000): Unknown MySQL server host 'swissm.railway.internal' (-2)
2 years ago
Please see this docs section -
https://docs.railway.app/guides/private-networking#initialization-time