Create MongoDB Users for the Replica Set

Create MongoDB users for the replica set of your (non-sharded) MongoDB deployment for the Event Repository.

About this task

At a minimum, you must create these MongoDB users for the Event Repository.

  • The MongoDB system administrator user.

    This user is required for accessing and administering your MongoDB database.

  • The MATRIXX Engine Event Loader (client) user.

    This user is required for the Event Loader to access your MongoDB system. The Event Loader service that runs on the MATRIXX Engine authenticates itself with this user.

Procedure

  1. Connect to the primary mongod of the replica set using the MongoDB mongo shell CLI.
    mongo
  2. Add the administrator user and the Event Loader (client) user by typing the following commands. Replace the value of the pwd field with your own password.
    use admin
    db.createUser(
        {
            user: "MtxAdmin",
            pwd: "password",
            roles: [{role: "root", db: "admin"}]
        }
    )
    db.auth("MtxAdmin", "password")
    use MtxEventDatabase
    db.createUser(
        {
            user: "MtxEventLoader",
            pwd: "12345678",
            roles: [{role: "dbAdmin", db: "MtxEventDatabase"}, {role: "readWrite", db: ​"MtxEventDatabase"},{role: "root", db: "admin"}]
        }
    )
    
    Note: The password you select for the MtxEventLoader user is required when you configure MATRIXX Engine.
    Note: If special characters are used in the username or password when creating the MongoDB user, you must encode each special character to URL encoded format (percent encoding) when you set these credentials later in MATRIXX configurations. For more information, see the discussion about URL encoding for special characters in MongoDB user names and passwords. To avoid URL encoding, use only alpha-numeric characters in MongoDB user names and passwords.
  3. (General Ledger only) If you plan to use MATRIXX GL utilities to process GL information from the Event Repository, see the discussion about setting user credentials for GL utilities, and follow the procedure for adding the GL utility (client) user.

What to do next

After users are created, the replica set is configured. You are now ready to define and add the required event database indexes by running Event Repository administration scripts. Download the MATRIXX Engine software to obtain the scripts (they are included in the MATRIXX Engine RPM) and perform prerequisite setup tasks for running the Event Repository administration scripts.