PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

pentaho5.0.1将数据库移植成mysql

原创
2016-06-07 15:27:43 902浏览

Pentaho 内置数据是 hsql. 数据库。那我们如何换掉移植成 mysql ? 思想: 移植的条件: 1. 首先要有一个 mysql 数据。 2. 将 pentaho 的启动配置连接到 mysql 上。 我现在做一个将 pentaho5.0 数据库移植的例子。我以 win7 系统为例子 1. 首先在 biserver-c

Pentaho内置数据是hsql.数据库。那我们如何换掉移植成mysql

 

思想:

移植的条件:

1.首先要有一个mysql数据。

2.pentaho的启动配置连接到mysql上。

 

 

我现在做一个将pentaho5.0数据库移植的例子。我以win7系统为例子

1.      首先在biserver-ce\data\mysql5文件夹下将里面3sql文件,在mysql下面运行。只要是pentaho5的解压就是3个文件。所以名字就不说了。

步骤是:登陆mysql  –u –p

          sql文件导入:Source 加文件路径

 

2.      然后就是将pentaho 的启动配置连接到mysql

所以一共修改6xml文件。

    

biserver-ce/pentaho-solutions/system/applicationContext-spring-security-jdbc.xml

biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties

biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml

biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties

biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml

biserver-ce/tomcat/conf/Catalina/localhost/pentaho.xml

配置文件1

biserver-ce/pentaho-solutions/system/applicationContext-spring-security-jdbc.xml

修改如下(红色部分位修改过的):

              class="org.springframework.jdbc.datasource.DriverManagerDataSource">

             

             

                     value="jdbc:mysql://localhost:3306/hibernate" />

             

             

配置文件2

biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties

修改如下(红色部分位修改过的):

jdbc.driver=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/hibernate

jdbc.username=hibuser

jdbc.password=password

hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

配置文件3

biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml

修改如下(红色部分位修改过的):

system/hibernate/mysql5.hibernate.cfg.xml

 

配置文件4

biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties 

修改如下(红色部分位修改过的):

SampleData/type=javax.sql.Datasource

SampleData/driver=com.mysql.jdbc.Driver

SampleData/url=jdbc:mysql://localhost:3306/sampledata

SampleData/user=pentaho_user

SampleData/password=password

Hibernate/type=javax.sql.DataSource

Hibernate/driver=com.mysql.jdbc.Driver

Hibernate/url= jdbc:mysql://localhost:3306/hibernate

Hibernate/user=hibuser

Hibernate/password=password

Quartz/type=javax.sql.DataSource

Quartz/driver=com.mysql.jdbc.Driver

Quartz/url= jdbc:mysql://localhost:3306/quartz

Quartz/user=pentaho_user     

Quartz/password=password

Shark/type=javax.sql.DataSource

Shark/driver=com.mysql.jdbc.Driver

Shark/url=jdbc:mysql://localhost:3306/shark

Shark/user=sa

Shark/password=

SampleDataAdmin/type=javax.sql.DataSource

SampleDataAdmin/driver=com.mysql.jdbc.Driver

SampleDataAdmin/url=jdbc:mysql://localhost:3306/sampledata

SampleDataAdmin/user=pentaho_admin

SampleDataAdmin/password=password

 

配置文件5

biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml

修改如下(红色部分位修改过的):

              factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"

              maxWait="10000" username="hibuser " password="password"

              driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hibernate"

              validationQuery="select 1" />

             

              factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"

              maxWait="10000" username=" pentaho_user" password=" password "

              driverClassName="com.mysql.jdbc.Driver"

url=" jdbc:mysql://localhost:3306/quartz"

              validationQuery="select 1"/>

 

配置文件6

biserver-ce/tomcat/conf/Catalina/localhost/pentaho.xml

修改如下(红色部分位修改过的):

              factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"

              maxWait="10000" username="hibuser " password="password"

              driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/hibernate"

              validationQuery="select 1" />

             

              factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="20" maxIdle="5"

              maxWait="10000" username=" pentaho_user" password=" password "

              driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/quartz"

              validationQuery="select 1"/>

这样一个数据库就一直成功了。

然后启动pentaho平台。在浏览器输入:localhost8080/pentaho就会进去像第一节的页面就说明一直成功。

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。