javascript - failed to connect to mongoose lab -
ive create mongoose lab db , im getting error in command line failed connect(i've provided right user , pass),what doing wrong , how can overcome issue?
mongoose.connect('mongodb://myuser:123456@ds063200.mongolab.com:61200/flights',function(err){ if(err) throw err; })
im using node.js
i believe using mongolab's username
& password
connecting database.
you should define username & password database in mongolab control panel
for example have database named 'test'
, after login mongolab i'll go https://mongolab.com/databases/test#users , add new username , password 'test'
database
username: hamid, password:zzzz
.
the connection test database
mongolab be
mongodb://hamid:zzzz@ds053438.mongolab.com:53438/test
updated: test connection via robomongo
connect mongolab
via robomongo
step 1: create new connection
step 2: enter address ds063200.mongolab.com
, 61200
port
step 3: enter flights
database , database user , password ('not mongolab user , password)
Comments
Post a Comment