This string includes the properties used to connect to a server that does not require authentication.

jdbc:datadirect:mongodb://host:port;AuthenticationMethod=None;DatabaseName=database;
  [property=value[;...]];

where:

host

specifies the name or the IP address of the MongoDB server to which you want to connect.

For example, myserver.
port

specifies the port number of the server listener. The default is 27017.

database
(optional) specifies the name of the database to which you want to connect. This value is used as the default qualifier for unqualified table names in SQL queries.
Important: This value is case-insensitive if you have access privileges to query the list of databases on the server. If you do not have access, this value is case-sensitive.
property=value
specifies connection property settings. Multiple properties are separated by a semi-colon.

The following example connection string includes the properties required for connecting without authentication.

Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:mongodb://myserver:27017;AuthenticationMethod=None;DatabaseName=mydb;");