Skip to content

Commit 45dc9f0

Browse files
authored
DOCSP-12957: [BIC] update Atlas connection example (#287)
1 parent 4071a23 commit 45dc9f0

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

source/reference/mongosqld.txt

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -997,10 +997,6 @@ default.
997997
write data as temporary files to disk. To review the MongoDB Atlas free
998998
tier constraints, see the `MongoDB Atlas manual <https://docs.atlas.mongodb.com/create-new-cluster/#service-m0-free-tier-limitations>`_.
999999

1000-
To connect the {+download-center-bi+}
1001-
to an Atlas cluster, you must provide :binary:`~bin.mongosqld` with a
1002-
``.pem`` key file.
1003-
10041000
:binary:`~bin.mongosqld` can use any valid TLS certificate issued by a
10051001
certificate authority, or a self-signed certificate. If you use a
10061002
self-signed certificate, although the communications channel will be
@@ -1013,38 +1009,39 @@ MySQL client to verify the server's identity.
10131009
For *testing* purposes, you can create a ``.pem`` key file named ``test.pem``
10141010
using the ``openssl`` tool:
10151011

1016-
10171012
.. code-block:: sh
10181013

10191014
openssl req -nodes -newkey rsa:2048 -keyout test.key -out test.crt -x509 -days 365 -subj "/C=US/ST=test/L=test/O=test Security/OU=IT Department/CN=test.com"
10201015
cat test.crt test.key > test.pem
10211016

1022-
Start :binary:`~bin.mongosqld` with the :option:`--auth
1023-
<mongosqld --auth>` and :option:`--sslPEMKeyFile
1024-
<mongosqld --sslPEMKeyFile>` options.
1025-
1026-
If you named your key file ``test.pem`` as in the previous example, you
1027-
can run the following, substituting your :ref:`schema file <drdl>` and
1028-
cluster URI:
1017+
Start :binary:`~bin.mongosqld` with the following options:
10291018

1030-
.. note:: Do not specify a username and password in :option:`--mongo-uri`. The
1031-
connection string should only contain the list of servers.
1019+
- :option:`--mongo-ssl <mongosqld --mongo-ssl>`
1020+
- :option:`--auth <mongosqld --auth>`
1021+
- :option:`--sslPEMKeyFile <mongosqld --sslPEMKeyFile>`
1022+
- :option:`--mongo-uri <mongosqld --mongo-uri>`
1023+
- :option:`--sslMode <mongosqld --sslMode>`
1024+
- :option:`--mongo-username <mongosqld --mongo-username>`
1025+
- :option:`--mongo-password <mongosqld --mongo-password>`
10321026

1027+
If you named your key file ``test.pem`` as in the previous example, you
1028+
can run the following, substituting your cluster URI and login
1029+
credentials:
10331030

10341031
.. code-block:: sh
10351032

10361033
mongosqld --mongo-ssl \
10371034
--auth \
10381035
--sslPEMKeyFile test.pem \
1039-
--schema <schema.drdl> \
10401036
--mongo-uri <uri> \
1041-
--sslMode allowSSL
1037+
--sslMode allowSSL \
1038+
--mongo-username <username> \
1039+
--mongo-password <password>
10421040

10431041
Pass your username, password, and authentication database to your SQL
10441042
client. For example, using ``mysql`` without verifying your :binary:`~bin.mongosqld`
10451043
server certificate:
10461044

1047-
10481045
.. code-block:: sh
10491046

10501047
mysql --host <mongosqld-host> --port <mongosqld-port> -u <username>?source=admin -p --ssl-mode required --enable-cleartext-plugin

0 commit comments

Comments
 (0)