Skip to content

Connection works via terminal mongo but not using Laravel-MongoDB #7

Closed
@freak4pc

Description

@freak4pc

Hey There,
Just installed Laravel-MongoDB on my Mongo setup,
After setting up everything in the database.php file I'm gettting a 'Failed to connect to: localhost:27017: Authentication failed on database 'vbtest' with username 'root': auth fails'

Even though I'm using exactly the same connection on the terminal which works.

Here's the Database.php config

'connections' => array(
                'mongodb'       => array(
                        'host'          => 'localhost',
                        'port'          => 27017,
                        'database'      => 'vbtest',
                        'username'      => 'root',
                        'password'      => 'mypassword'
                )
        ),

And this is how It works in the terminal

mongo --username=root --password=mypassword

Any ideas?
Thanks!
Shai.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions