Switching from HSQL to MySQL or any other DB in Liferay

Wikis > Switching from HSQL to MySQL or any other DB in Liferay

Lets Switch from existing HSQL to MySQL.

Simplest way of switching database is to use a property file named portal-ext.properties.Way to override the existing features can be written into this file.

Go to Liferay tomcat directory->WEB-INF->classes. Their you find the file portal-ext.properties.
In case you don’t find it,create a new file named portal-ext.properties.
Add the below database configuration parameters to run LFRay on MySQL.

    # MySQL

After saving the file, access MySQL to create a database named lportal with encoding as UTF-8.

create database lportal character set utf8;


Now just start the server and you will see Liferay pointed to MySQL. It will create the set of all tables required automatically.


Same way you can point to any DB by just adding the database properties in portal-ext.properties.

Refer to the database properties for pointing to any other DB.

Downoad database properties