In Mavis version v1.10.0, a new database connectivity feature has been introduced, with dedicated support for connecting to PostgreSQL using the MD5 and SASL protocol. Here are some key details on how to establish a connection to a PostgreSQL database in Mavis:
- Supported Database Connection: PostgreSQL versions 13 and below default to MD5 authentication. For versions 14 and above, the default is SASL authentication.
- Supported Integrated Development Environments (IDEs): This feature has been thoroughly tested and is supported in IDEs such as pgweb and DBeaver.
- Supported Libraries: Compatibility has been ensured with libraries such as Node pg and Node TypeORM.
-
To initiate a connection in Mavis, navigate to the "DB Server" page located in the sidebar.
- DB server
- DB server
-
On the "DB Server" page, click on "Add DB Server."
-
Enter the "DB Server Name" and the "Host."
-
Add DB server successfully.
-
- Next, please create a secret on the Secret Management page (skip if you already have a secret, and proceed to the next step). Choose the secret type "Login password." For detailed instructions on the creation process, refer to: https://mavis.pentium.network/hc/en-us/articles/8314400562836
- Secret Management page
- Please select the "Login password" secret type and follow the detailed steps for secret creation.
- Secret Management page
- If you already have a usable secret, proceed to create a service on the Access Services page. Select "DB Server" as the resource type and choose "PostgreSQL" as the protocol. For detailed steps on creating a service, please refer to: https://mavis.pentium.network/hc/en-us/articles/8399005786516-How-do-I-connect-to-the-server-from-Mavis-SSH-RDP-VNC-SFTP-PostgreSQL-
- Access Services page
- Select "DB Server" as the resource type, choose "PostgreSQL" as the protocol, and input the Port and default database name. (Ensure that the Port and default database name match the configuration of your PostgreSQL server. This information is crucial for Mavis to establish a connection to the specified database server.)
- Access Services page
- After completing all configurations, you can navigate to the "DB Server" page and select "Connection Information." Verify if you can successfully connect to the PostgreSQL database using the temporary credentials generated by Mavis.
The Database Server Connection feature allows you to generate a temporary password for connecting to the database server. Ensure that you do not share this password with anyone who should not have access to your server.
-
On the "DB Server" page, select "Connection Information."
- Choose the "Access Service" you want to connect to, and click on "Generate Password."
- Please use the temporary credentials within 15 minutes.
From the temporary credentials window, copy the "Temporary Username," "Temporary Password," "Host," and "Port" to connect to your database software. If you encounter any connection issues, ensure that the database server password is correct and the server is running. For assistance, please contact your system administrator.
-
- Session recording
- Session recording detail, Summary
- DB server activity
- Session recording detail, Summary
-
Others: While in edit mode, you can add tags for better categorization.
- Others: During deletion, there will be a confirmation prompt to ensure that the deletion is intentional.