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 

enter image description here

updated: test connection via robomongo

connect mongolab via robomongo

step 1: create new connection

enter image description here

step 2: enter address ds063200.mongolab.com , 61200 port

enter image description here

step 3: enter flights database , database user , password ('not mongolab user , password)

enter image description here


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -