Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mongodb://<user>:<password>@staff.mongohq.com:10022/testdb
- my $connection = MongoDB::Connection->new(host => 'localhost', port => 27017);
- my $database = $connection->foo;
- my $connection = MongoDB::Connection->new(host => 'mongodb://staff.mongohq.com:10022', username => 'dbuser', password => 'dbpass', db_name => 'testdb');
- my $database = $connection->testdb;
- use MongoDB;
- use MongoDB::OID;
- my $conn = MongoDB::Connection->new(
- host => 'remote server's inet address or host name',
- port => 27017,
- username=>'your_user_name',
- password => 'your_password',
- db_name => 'your_db_name'
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement