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.