Home » Java, Liferay, Linux, Mysql

Liferay 5.2.1 with Mysql in Glassfish 2.1

13 February 2009 No Comment

In the old versions of Liferay, switching from HSQL to MySQL was easy under Glassfish. Just replace the jdbc connector created for HSQL with one for MySQL and at the next restart of Liferay all was working ok. From version 5.2.1 configuration was changed and all is done from portal.properties. To switch from HSQL just create a portal-ext.properties with the following content:

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

and putit in /domain/domain1/applications/j2ee-module/liferay-portal/WEB-INF/classes/ if you are running in a single instance or if you are running in a clustered instance /nodeagents/agent1/instance1/applications/j2ee-module/liferay-portal/WEB-INF/classes .

Good Luck


Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.