Legacy Knowledge Base
Published Sep. 10, 2025

Liferay Portal Database Portal Properties

Written By

Michael Warren Young

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.

This article is intended to provide a list of all of the Liferay Portal Database properties that can be used to connect your portal to various databases. To use any of them, un-comment the block of code and paste it into your portal-ext.properties file.

For example, to enable MySQL, you should copy and paste the below into your portal-ext.properties file:

MySQL
    #
    #jdbc.default.driverClassName=com.mysql.jdbc.Driver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

Replacing lportal in jdbc.default.url with the name of your database and inserting the username and password of your intended database user in the appropriate properties.

Resolution

Portal Properties

JDBC
##

    #
    # Set the JNDI name to lookup the JDBC data source. If none is set,
    # then the portal will attempt to create the JDBC data source based on the
    # properties prefixed with "jdbc.default.".
    #
    #jdbc.default.jndi.name=jdbc/LiferayPool

    #
    # Set the properties used to create the JDBC data source. These properties
    # will only be read if the property "jdbc.default.jndi.name" is not set.
    #
    # The default settings are configured for an in-memory database called
    # Hypersonic that is not recommended for production use. Please change the
    # properties to use another database.
    #
    # Add dynamic-data-source-spring.xml to the property "spring.configs" to
    # configure the portal to use one database cluster for read calls and
    # another database cluster for write calls. The convention is to create a
    # set of properties prefixed with "jdbc.read." to handle read calls and
    # another set of properties prefixed with "jdbc.write." to handle write
    # calls. These data sources can also be created via JNDI by setting the
    # properties "jdbc.read.jndi.name" and "jdbc.write.jndi.name". Note that
    # these settings, though separate, are a copy of the default settings with
    # the newly overridden values.

DB2

DB2
    #
    #jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
    #jdbc.default.url=jdbc:db2://localhost:50000/lportal:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;
    #jdbc.default.username=db2admin
    #jdbc.default.password=lportal

Derby

Derby
    #
    #jdbc.default.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
    #jdbc.default.url=jdbc:derby:lportal
    #jdbc.default.username=
    #jdbc.default.password=

Hypersonic

Hypersonic
    #
    jdbc.default.driverClassName=org.hsqldb.jdbcDriver
    jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
    jdbc.default.username=sa
    jdbc.default.password=

Ingres

Ingres
    #
    #jdbc.default.driverClassName=com.ingres.jdbc.IngresDriver
    #jdbc.default.url=jdbc:ingres://localhost:II7/lportal
    #jdbc.default.username=
    #jdbc.default.password=

MySQL

MySQL
    #
    #jdbc.default.driverClassName=com.mysql.jdbc.Driver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

Oracle

Oracle
    #
    #jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
    #jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
    #jdbc.default.username=lportal
    #jdbc.default.password=lportal

P6Spy

P6Spy
    #
    #jdbc.default.driverClassName=com.p6spy.engine.spy.P6SpyDriver
    #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    #jdbc.default.username=
    #jdbc.default.password=

PostgreSQL

PostgreSQL
    #
    #jdbc.default.driverClassName=org.postgresql.Driver
    #jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

SQL Server

SQL Server
   #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

Sybase

Sybase
    #
    #jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
    #jdbc.default.url=jdbc:jtds:sybase://localhost:5000/lportal
    #jdbc.default.username=sa
    #jdbc.default.password=

Additional Information

See the Compatibility Matrix page to see which Databases are supported with different versions of Liferay.

Did this article resolve your issue ?

Legacy Knowledge Base