Saiku migrating to MySQL Step

Source: Internet
Author: User

Saiku database tables and users are created by default when the project is started, by initializing the h2database in the Saiku-beans.xml This bean executes the Init method of the Org.saiku.service.Database class to initialize the data table and the default user.

Default User migration MySQL step:

1. Modify the Web. xml file to modify the value named Db.url,db.user,db.password.

2. Modify Saiku-bean.xml, comment h2database, add mysqldatabase, modify Databasemanager property in Licensebean to Mysqldatabase.

3. Modify the Saiku-beans.properties file to modify the value of the Userdao.driverclass,userdao.url,userdao.username,userdao.password.

4. Modify the Applicationcontext-spring-security-jdbc.properties file, modify the Jdbcauth.driver,jdbcauth.url,jdbcauth.username,jdbcauth.password The value.

5. Modify the file Database.java file:

Modify the Init method, comment out Loadearthquakes () (will cause an error to start)
Modify the Jdbcdatasource in the Initdb method to Mysqldatasource
To modify the SQL statements in the Loadusers method, the Checkupdatedencyption method, and the Updateforencyption method (because of differences in syntax between H2 and MySQL), refer to the article:/http Www.cnblogs.com/avivaye/p/4881106.html

Data table Migration MySQL step (Default User migration completed):

1. Create a data table and insert data.

2. Create folders Legacy-datasources and Legacy-schema in your project, and copy schema and datasources files

3. Modify the file Database.java file:

Modify the Init method, commenting out the Loadearthquakes () and Loadfoodmart () methods

Modify the Loadlegacydatasources () method to directly introduce the schema file and the DataSources file

4. Modify the Importdatasources () method of the Legacyimporterimpl.java file:

Launch Project login View Test data:

Reference: http://www.cnblogs.com/avivaye/p/4881106.html

Saiku migrating to MySQL Step

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.