Database Service (MySQL)¶
The database service (MySQL) is a distributed relational database service that simplifies the setup, operation, and scaling of your applications. It’s a private service inside your application environment and can only communicate with your other services, not the public internet.
See the Database service limitations section for more information.
Environment Variables¶
You can set these environment variables to configure the database service. When setting LCP_MASTER_USER_NAME
, LCP_MASTER_USER_PASSWORD
, and LCP_DBNAME
, make sure to use the same values for other services that depend on the database service (e.g., the backup and Liferay DXP services). You should set these variables before the first deployment. If a build is generated with new values for these variables, subsequent deployments will fail. It may be viable in a development environment to delete services and update the LCP.json
file with new values for these variables, but this isn’t viable in a production environment.
Name |
Default Value |
Description |
---|---|---|
|
|
Database name. |
|
|
Master username. |
|
|
Master password. |
Database Maintenance Window Variables¶
Your DXP Cloud environment’s database service occasionally requires downtime for scheduled maintenance, typically for about two minutes. You can configure a preferred window for this maintenance to take place to reduce the downtime’s impact. By default, no specific time preference is defined.
Name |
Acceptable Values |
Description |
---|---|---|
|
|
Preferred day of the week (Monday (1) through Sunday (7), in UTC time). |
|
|
Preferred hour of the day (in UTC time). |
|
|
Set |
Google Cloud MySQL Flags¶
You can pass MySQL flags in as environment variables. The available flags are listed in the
Google Cloud documentation. Each flag must be prepended with LCP_GCP_DATABASE_FLAG_
to work in Liferay DXP Cloud. Below are common flags that can be useful for debugging in a development environment, but should NOT be used in a production environment as they have significant performance costs.
Warning
As noted in Google’s documentation, some database flag settings can affect instance availability or stability. Be very careful when using these flags and follow Google’s Operational Guidelines.
Name |
Acceptable Values |
Default Value |
---|---|---|
|
|
|
|
|
|