I have created a mongodb database for testing and I can't connect to the database

I use a nodejs + express + mongoose server and my uri for the connect function is :
mongodb://root:xxx@z4a58c1e2-mongodb.qovery.io:27017/excercice-tracker

where user and password are the credentials for the database

You can find the database credentials on your database app on the left where it says Show credentials.

I would advise against posting your URI here for security purposes. Please edit your post and remove it.

1 Like

Hello @josealejandro2928,

Your database is accessible, you just need to use the default database name which is admin and not exercise-tracker. So in your case the url is
mongodb://root:xxxx@z4a58c1e2-mongodb.qovery.io:27017/admin

You can use env variable QOVERY_MONGODB_Z4A58C1E2_DATABASE_URL which is injected automatically by qovery to connect to your db instance.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.