This article is intended to provide a list of all the Liferay DXP 7.1 database properties that can be used to connect your DXP 7.1 installation to various databases. To use any of them, uncomment the block of code you need, 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
:
# # MySQL # #jdbc.default.driverClassName=com.mysql.jdbc.Driver #jdbc.default.url=jdbc:mysql://localhost/lportal?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&useFastDateParsing=false&useUnicode=true #jdbc.default.username= #jdbc.default.password=
Replace lportal
in jdbc.default.url
with the name of your database, uncommenting the four properties, 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. # # To configure the portal to use one data source for read calls and another # data source for read-write calls, follow these steps: # # 1. Similar to the settings prefixed with "jdbc.default.", create a set of # properties prefixed with "jdbc.read." to handle read calls and another # set of properties prefixed with "jdbc.write." to handle read-write calls. # # 2. Add "jdbc.read.jndi.name" and "jdbc.write.jndi.name" properties that # specify the data source JNDI names. # # 3. Add dynamic-data-source-spring.xml to the property # "spring.configs" and dynamic-data-source-infrastructure-spring.xml to the # property "spring.infrastructure.configs" #
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
Hypersonic
# # Hypersonic # jdbc.default.driverClassName=org.hsqldb.jdbc.JDBCDriver jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hypersonic/lportal;hsqldb.write_delay=false jdbc.default.username=sa jdbc.default.password=
MariaDB
# # MariaDB # #jdbc.default.driverClassName=org.mariadb.jdbc.Driver #jdbc.default.url=jdbc:mariadb://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false #jdbc.default.username= #jdbc.default.password=
MySQL
# # MySQL # #jdbc.default.driverClassName=com.mysql.jdbc.Driver #jdbc.default.url=jdbc:mysql://localhost/lportal?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&useFastDateParsing=false&useUnicode=true #jdbc.default.username= #jdbc.default.password=
Oracle
# # Oracle # #jdbc.default.driverClassName=oracle.jdbc.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?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&useFastDateParsing=false&useUnicode=true #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=com.microsoft.sqlserver.jdbc.SQLServerDriver #jdbc.default.url=jdbc:sqlserver://localhost;databaseName=lportal #jdbc.default.username=sa #jdbc.default.password=
Sybase
# # Sybase # #jdbc.default.driverClassName=com.sybase.jdbc4.jdbc.SybDriver #jdbc.default.url=jdbc:sybase:Tds:localhost:5000/lportal #jdbc.default.username=sa #jdbc.default.password=
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In