title: MongoError: database names cannot contain the character ' ' when using mongoosejs connect to mLab
body: <p>Here is my JS code:</p>
  
  <pre><code>var mongoose = require('mongoose'); 
  
  mongoose.connect("mongodb://myUsername:myPassword@ds161039.mlab.com:61039/accounttest");
  </code></pre>
  
  <p>and here is the error when I start server</p>
  
  <pre><code>C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongodb\lib\db.js:1774
  if(databaseName.indexOf(invalidChars[i]) != -1) throw MongoError.create({message: "database names cannot contain the character '" + invalidChars[i] + "'", driver:true});
                                                  ^
  MongoError: database names cannot contain the character ' '
  at Function.MongoError.create (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongodb-core\lib\error.js:31:11)
  at validateDatabaseName (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongodb\lib\db.js:1774:70)
  at new Db (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongodb\lib\db.js:154:3)
  at NativeConnection.doOpen (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:55:15)
  at NativeConnection.Connection._open (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\connection.js:531:15)
  at C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\connection.js:289:11
  at new Promise.ES6 (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\promise.js:45:3)
  at NativeConnection.Connection.open (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\connection.js:288:17)
  at Mongoose.connect (C:\Users\Qk Lahpita\Desktop\server_node_2\node_modules\mongoose\lib\index.js:242:47)
  at Object.&lt;anonymous&gt; (C:\Users\Qk Lahpita\Desktop\server_node_2\server.js:36:10)
  at Module._compile (module.js:571:32)
  at Object.Module._extensions..js (module.js:580:10)
  at Module.load (module.js:488:32)
  at tryModuleLoad (module.js:447:12)
  at Function.Module._load (module.js:439:3)
  at Module.runMain (module.js:605:10)
  </code></pre>
  
  <p>My database's name is "accounttest", not contain ' ' character. Why do I have this error and how can I fix it?</p>
  
  <p>Thanks!</p>