Liferay's own database is very mini, generally is to play.
In the real development process, we often need to connect it to our local database.
There are 3 ways, and I'm just going to introduce my favorite method here. Even MySQL.
1. Create the portal-ext.properties file in the root directory of the Liferay portal, where the contents are
Jdbc. default. driverclassname=com.mysql.jdbc.Driver jdbc. default. Url=jdbc:mysql://Localhost/lportal?useunicode=true&characterencoding=utf-8 &usefastdateparsing=false jdbc. Default. username=root jdbc. default. password=root
2. Change the username and password to your username and password.
3. If you want to see the effect, start Liferay Portal
4. Open your database connection with Navcat, and you'll see a list of the Liferay comes with
Note: If the connection fails, you can go to the. /tomcat-8.0.32/lib/ext find out if there's no mysql.jar, if it's not copied from somewhere else.
Liferay How to connect to a local database