Legacy Knowledge Base
Published Jun. 30, 2025

Public access of database

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • How users can enable public access to the database of their PaaS environment

Environment

  • Liferay self-managed (LXC-SM)

Resolution

  • Enabling even read permissions to the database is a huge security risk. However, if the goal is to monitor the queries for possible performance issues, then a monitoring tool is much more suited to this since it can provide statistics over time.

  • If users want to see which queries are running, then they can download a backup of their database and run their application locally against it. For example, there are settings for hibernate that can be used to output every query that is executed in Liferay, or you could monitor things locally in their database. Users could optimize their application in any way they see fit (adding indexes, etc.).

  • If users are looking for production monitoring, this can be done through an APM tool like Dynatrace or Glowroot.

    • Whereas, a viable solution would involve utilizing the DXPC Liferay shell UI to access the database or using a previous database service version (5.3.0 or earlier) to enable HAProxy usage for this purpose (note that this should be considered a temporary measure to facilitate access).

  • One alternative users could pursue would be to create their custom service and install their client to connect to the database from within their project.

    • Common tools are phpMyAdmin or https://www.pgadmin.org/ , for MySQL and PostgreSQL, respectively, but they can use any solution that they prefer. This might require more resources, such as memory or instances, but then the user can connect it using the webserver. 

Additional Information

  • Please raise a support ticket if any more information is required on this subject. 
Did this article resolve your issue ?

Legacy Knowledge Base