Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Overview of this book

Table of Contents (19 chapters)
Liferay 6.x Portal Enterprise Intranets Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up database access for the master/slave configuration


Liferay allows us to configure two different data sources: first for writing and second for reading. This configuration, in an easy way, allows users to split writing and reading requests. This type of configuration lets us build scalable and high-performance infrastructure.

Getting ready…

As we mentioned at the beginning, we are focusing on Liferay configuration aspects. Our assumption is that you are ready to use database servers with master/slave replication. The MySql official documentation at https://dev.mysql.com/doc/refman/5.1/en/replication-configuration.html describes how to configure replication.

How to do it…

In order to achieve our goal, open portal-ext.properties and configure the following settings:

jdbc.write.driverClassName=com.mysql.jdbc.Driver
jdbc.write.url=jdbc:mysql://<DB_WRITE_ADDRESS>/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.write.username=<USERNAME>
jdbc...