Welcome to the Alteryx Knowledge Base

How to connect to MongoDB from the Command Line
user

Created/Edited - 12/6/2024 by Markelio Hoxhallari | Alteryx

Prerequisites
  • Alteryx Server
    • All versions
    • MongoDB persistence layer
Procedure

When using embedded MongoDB

  1. Run Command Prompt as Administrator
  2. Change directories to the bin folder of your Alteryx installation. By default, the path is C:\Program Files\Alteryx\bin
     cd "C:\Program Files\Alteryx\bin"
  3. Open Alteryx System Settings
  4. Navigate to Controller > Persistence
  5. Gather Password (not Admin Password) from the Persistence section and save it for later use
 
This image shows where the MongoDB password is located in Alteryx System Settings.
 
  1. Run the following comand to connect to a database:
    • For Server versions 2023.1 and older:
      mongo -u user -p [MongoDB Password] -host [Controller host name]:27018 [Database name]
    • For Server versions 2023.2 and newer:
      mongosh -u user -p [MongoDB Password] -host [Controller host name]:27018 [Database name]
    • Server uses the following database names in MongoDB:
      • AlteryxGallery
      • AlteryxService
      • AlteryxGallery_Lucene (only available in Server version 2022.3 and older)
    • Note: If you are not able to connect to the MongoDB shell, please make sure the Alteryx Service is running before trying to connect to the MongoDB and that the username and password are correct.


When using user-managed MongoDB

Use the MongoDB Shell to connect to the user-managed MongoDB instance. Refer to the steps in the MongoDB documentation: Connect to a Deployment . You may also want to reach out to your MongoDB Administrator for assistance.
Additional Information
Was this article helpful?