liferay migrate data from hsql to mysql

2019-09-09 23:11发布

问题:

I am having Liferay 6.2. It has some data in hsql. I need to import these data into mysql database. How can I import all data from hsql to mySQL.

I am having following files in data/hsql folder lportal.lck (lck file) lportal (seems like data base dump) lportal.properties lportal.script

Is there any way to import db using some script or changing some configuration files.

回答1:

One way is you can try using the Data migration tool liferay provides, check out the Liferay User-guide and scroll to Data-migration section, some relevant part of it is reproduced below:

The first section lets you copy your entire Liferay database from the current database under which it is running to the database you specify in this set of fields. You’ll need to enter the driver class name (and the driver will need to be on Liferay’s classpath), the JDBC URL of the database to which you’ll be copying your data and the credentials of a user with access to that database. Once you have all of this information entered, click Execute to copy the data.

Go to Control PanelServer AdministrationData Migration TabEnter the jdbc property of the mysql databaseExecute

After this shut-down your server and update your portal-ext.properties to point to the new mysql database and restart your server. Done!