diff --git a/examples/src/test/kotlin/MongoClientSettingsTest.kt b/examples/src/test/kotlin/MongoClientSettingsTest.kt index b8d8de9d..8976c3cb 100644 --- a/examples/src/test/kotlin/MongoClientSettingsTest.kt +++ b/examples/src/test/kotlin/MongoClientSettingsTest.kt @@ -22,7 +22,7 @@ import kotlin.test.Ignore // } /* NOTE: These tests are not run by default because they require a MongoDB deployment -with a username and password. To run these tests locally, you need to set up your .env +with a database username and database password. To run these tests locally, you need to set up your .env and replace the @Ignore annotation with @Test on the tests you want to run. */ class MongoClientSettingsTest { diff --git a/examples/src/test/kotlin/NetworkCompressionTest.kt b/examples/src/test/kotlin/NetworkCompressionTest.kt index 8cebb2c1..853eb327 100644 --- a/examples/src/test/kotlin/NetworkCompressionTest.kt +++ b/examples/src/test/kotlin/NetworkCompressionTest.kt @@ -16,7 +16,7 @@ import kotlin.test.assertEquals // :replace-start: { // "terms": { // "CONNECTION_URI_PLACEHOLDER": "\"\"", -// "${uri}&": "mongodb+srv://:@/?" +// "${uri}&": "mongodb+srv://:@/?" // } // } diff --git a/examples/src/test/kotlin/SocksTest.kt b/examples/src/test/kotlin/SocksTest.kt index 8eebaa17..d03f82ae 100644 --- a/examples/src/test/kotlin/SocksTest.kt +++ b/examples/src/test/kotlin/SocksTest.kt @@ -14,7 +14,7 @@ import kotlin.test.Ignore // :replace-start: { // "terms": { // "CONNECTION_URI_PLACEHOLDER": "\"\"", -// "${uri}&": "mongodb+srv://:@/?" +// "${uri}&": "mongodb+srv://:@/?" // } // } diff --git a/examples/src/test/kotlin/TlsTest.kt b/examples/src/test/kotlin/TlsTest.kt index f4548316..21c9a61e 100644 --- a/examples/src/test/kotlin/TlsTest.kt +++ b/examples/src/test/kotlin/TlsTest.kt @@ -30,7 +30,7 @@ internal class TlsTest { @Disabled("Disabled because host does not exist") fun tlsConnectionStringTest() = runBlocking { // :snippet-start: tls-connection-string - val mongoClient = MongoClient.create("mongodb+srv://:@?tls=true") + val mongoClient = MongoClient.create("mongodb+srv://:@?tls=true") // :snippet-end: mongoClient.close() } diff --git a/source/connection-troubleshooting.txt b/source/connection-troubleshooting.txt index 1d2d7e2b..0d88b3a2 100644 --- a/source/connection-troubleshooting.txt +++ b/source/connection-troubleshooting.txt @@ -89,12 +89,12 @@ issues when attempting to connect to MongoDB. For more information about using connection strings with the {+driver-short+}, see :ref:`Connection URI ` in the Connection Guide. -If your connection string contains a username and password, ensure that they +If your connection string contains a database username and database password, ensure that they are in the correct format. .. note:: - If the username or password includes any of the following characters, they + If the database username or database password includes any of the following characters, they must be `percent encoded `__: .. code-block:: none @@ -116,8 +116,8 @@ connection if one of the hosts is unreachable. Verify User Is in Authentication Database ----------------------------------------- -To successfully authenticate a connection by using a username and password, -the username must be defined in the authentication database. The default +To successfully authenticate a connection by using a database username and database password, +the database username must be defined in the authentication database. The default authentication database is the ``admin`` database. To use a different database for authentication, specify the ``authSource`` in the connection string. The following example instructs the driver to use ``users`` as the authentication diff --git a/source/examples/generated/NetworkCompressionTest.snippet.connection-string-compression-example.kt b/source/examples/generated/NetworkCompressionTest.snippet.connection-string-compression-example.kt index c0859267..9bc216b3 100644 --- a/source/examples/generated/NetworkCompressionTest.snippet.connection-string-compression-example.kt +++ b/source/examples/generated/NetworkCompressionTest.snippet.connection-string-compression-example.kt @@ -1,5 +1,5 @@ // Replace the placeholders with values from your MongoDB deployment's connection string -val connectionString = ConnectionString("mongodb+srv://:@/?compressors=snappy,zlib,zstd") +val connectionString = ConnectionString("mongodb+srv://:@/?compressors=snappy,zlib,zstd") // Create a new client with your settings -val mongoClient = MongoClient.create(connectionString) +val mongoClient = MongoClient.create(connectionString) \ No newline at end of file diff --git a/source/examples/generated/SocksTest.snippet.socks-connection-string.kt b/source/examples/generated/SocksTest.snippet.socks-connection-string.kt index d1c0aff0..26dcd8fc 100644 --- a/source/examples/generated/SocksTest.snippet.socks-connection-string.kt +++ b/source/examples/generated/SocksTest.snippet.socks-connection-string.kt @@ -1,5 +1,5 @@ val connectionString = ConnectionString( - "mongodb+srv://:@/?" + + "mongodb+srv://:@/?" + "proxyHost=" + "&proxyPort=" + "&proxyUsername=" + diff --git a/source/examples/generated/TlsTest.snippet.tls-connection-string.kt b/source/examples/generated/TlsTest.snippet.tls-connection-string.kt index 530d7d22..65e96f5b 100644 --- a/source/examples/generated/TlsTest.snippet.tls-connection-string.kt +++ b/source/examples/generated/TlsTest.snippet.tls-connection-string.kt @@ -1 +1 @@ -val mongoClient = MongoClient.create("mongodb+srv://:@?tls=true") +val mongoClient = MongoClient.create("mongodb+srv://:@?tls=true") diff --git a/source/usage-examples.txt b/source/usage-examples.txt index 56cb08d2..bbc94586 100644 --- a/source/usage-examples.txt +++ b/source/usage-examples.txt @@ -63,7 +63,7 @@ to learn how to allow connections to your instance of Atlas and to find the :manual:`connection string ` you use to replace the ``uri`` variable in usage examples. If your instance uses :manual:`SCRAM authentication `, you can replace -```` with your username, ```` with your password, and +```` with your database username, ```` with your database password, and ```` with the IP address or URL of your instance. For more information about connecting to your MongoDB instance, see our