AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

Atlas クラスターの作成と設定

このチュートリアルでは、 Atlas 設定コマンドを使用して次の操作を行う方法を説明します。

  1. Atlas プロジェクトに 1 つのクラスターを作成します。

  2. Load sample data into your Atlas cluster.

  3. IP アドレスをプロジェクトの IP アクセス リストに追加します。

  4. Atlas クラスターの MongoDB ユーザーを作成します。

  5. Connect to your new cluster using the MongoDB Shell, mongosh.

新しい Atlas アカウントの作成中にこれらのすべての手順を実行するには、「 Atlas を使い始める 」を参照してください。

構成ファイルを使用してクラスターを作成するには、atlas setup ではなく --file オプションを指定して、 Atlasクラスター作成コマンドを実行します。 Atlas クラスターの構成ファイルの詳細については、「クラスター構成ファイル 」を参照してください。

また、 atlas setupを使用して Atlas アカウントを作成し、Atlas で認証することもできます。 詳細については、 「 Atlas の使用 」を参照してください。

始める前に、次のタスクを完了してください。

Atlas でM0クラスターを作成するには、 atlas setupコマンドを使用します。 M0クラスターには運用上の制限がいくつかあります。

このコマンドは、次の方法で実行できます。

  • デフォルト設定モード: コマンドは、デフォルト設定を持つサンプル共有階層クラスターを作成します。

  • 対話モード: コマンドはクラスター設定を要求し、デフォルト値を提供します。

  • 非対話型モード: オプションを指定して コマンドを実行します。

[] タブをクリックすると、ご希望モードのコマンドが表示されます。

コマンドは、次のデフォルト設定を持つサンプル共有階層クラスターを作成します。

  • クラスター名: Cluster<number>

  • サービスプロバイダー: AWS

  • プロバイダー リージョン: US_EAST_1

  • クラスター階層: M0

  • ディスクサイズ: 0.5 GB

  • データベースユーザー名: Cluster<number>

  • データベースユーザー パスワード: abcdef12345

  • IP アドレス からの接続を許可します。 <YourIPAddress>

  • サンプル データのロード: Yes

  • shell開きます: No

注意

パスワードは自動生成されたランダムな値です。 abcdef12345はサンプル値です。

atlas setup --force
We are deploying Cluster9876543...
Please store your database authentication access details in a secure location
Database User Username: Cluster9876543
Database User Password: abcdef12345
Creating your cluster... [Its safe to 'Ctrl + C']
Cluster created.
Your connection string: mongodb+srv://cluster9876543.example.mongodb.net
Loading sample data into your cluster... [Its safe to 'Ctrl + C']
Now you can connect to your Atlas cluster with: mongosh -u Cluster9876543 -p abcdef12345 mongodb+srv://cluster9876543.example.mongodb.net

成功します。 データをホストするためのクラスターが正常に作成されました。

Use the connection string to connect to your cluster through mongosh or your application.

クラスターのステータスを表示する には、以下を行います。