While following chapter 1 example code, connect to mongolab, I am getting the error message: 'database names cannot contain the character '.' Here is my code:

// .............................................................
var mongoose = require('mongoose');
var Schema = mongoose.Schema;

module.exports.mongoose = mongoose;
module.exports.Schema = Schema;

// Connect to cloud database
var username = "myusername";
var password = "mypassword";
var address = ' @ds045147.mongolab.com:45147/mydatabasename';
connect();

// Connect to mongo
function connect() {
var url = 'mongodb://' + username + ':' + password + address;
mongoose.connect(url);
}

function disconnect() { mongoose.disconnect(); }

// ...................................................................................

Any suggestions on what I may be doing wrong? Thanks in advance for any help.

MN