R
Railway2y ago
Auly

import .json to Mongodb

I use mongoimport command to import a json file to my mongodb. prompt me type a user name. where can I find it? On railway, I only see a window to write json, but can't to import json file.
16 Replies
Percy
Percy2y ago
Project ID: c7cb0789-9eba-454f-8499-d7ee14e026af
Auly
AulyOP2y ago
c7cb0789-9eba-454f-8499-d7ee14e026af Have anyone here?
luna
luna2y ago
You should be able to use the mongo cli locally todo this. To get the envs either get them from the mongodb service in your project or use the railway cli.
Auly
AulyOP2y ago
"Enter password for mongo user", I don 't know my password. I have never set username of mongo.
luna
luna2y ago
its mongo
Auly
AulyOP2y ago
? I don't understand your meaning.
luna
luna2y ago
the username is mongo
luna
luna2y ago
if you check the connection string in the settings of your mongodb service youll notice this
luna
luna2y ago
mongo:** <-- the star is the password the username is mongo
Auly
AulyOP2y ago
ah. I know.Thanks. Are you still here?
luna
luna2y ago
please delete that and reset your password if you're using the uri you do not need the username or password fields that's likely your issue.
Auly
AulyOP2y ago
also get this error: error connecting to host: failed to connect to mongodb
luna
luna2y ago
please delete the other message you sent and reset the password on your database
Adam
Adam2y ago
I deleted it
luna
luna2y ago
please stop posting you password bud you will need to use the site to change it i believe but you really need to stop posting it.
Auly
AulyOP2y ago
fine
Want results from more Discord servers?
Add your server