Setting up Liferay with MySQL on Windows

By default, Liferay uses the HSQL database. This default database configuration can be switched to another database like MySQL. This post will give a step by step approach to set up Liferay with MySQL database.

  • Download the Liferay tomcat bundle and setup the Liferay development environment. Please refer to the link for more information.
  • Install MySQL service on windows. Please refer to the link for more information.
  • Open MySQL DB from the command prompt and create a database called “lportal” as shown:
  • Navigate to the path:  ${CATALINA_HOME}/webapps/ROOT/WEB-INF/classes
  • Create a new property file named “” and add the DB configuration settings as follows:
jdbc.default.username={db username}
jdbc.default.password={db password}
  • Save the file and restart the tomcat server.
  • The Liferay portal is now ready to use.

Note: For the first time server takes several minutes to create default tables inside newly created lportal DB.

You may also interested in