NodeJS backend does not connect to MYSQL

moroale93
TRIAL

6 months ago

On my Railway project, I am using a MySQL DB and a NodeJS server.
I added a reference of the MYSQL_URL variable from MySQL instance to the node one, no I have an ENV variable on the Server that allows me to connect to the DB.
I start the Server but it says that is not able to connect to the DB.
This is weird. I am not able to connect to it neither using the public URL from my local using a tool to navigate the DB.
If I go to the MySQL instance settings and then Data, I see a loading state on "Database Connection".

The error it prints on the server is:
Error connecting to MySQL: Access denied for user 'root'@'fd12:****:****:*:****:**:****:dc61' (using password: YES)

Solved

2 Replies

moroale93
TRIAL

6 months ago

Ok, following this suggestion (https://help.railway.com/questions/i-cant-connect-to-my-mysql-database-5324bdac) I removed the DB and created a new one and that worked.


6 months ago

Awsome!


Status changed to Awaiting User Response Railway 6 months ago


Status changed to Solved brody 6 months ago


NodeJS backend does not connect to MYSQL - Railway Help Station