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 文件夹下将里面 3 个 sql 文件,在 mysql 下面运行。只要是 pentaho5 的解压就是 3 个文件。所以名字就不说了。
步骤是:登陆 mysql –u –p
将 sql 文件导入: Source 加文件路径
2. 然后就是将 pentaho 的启动配置连接到 mysql 。
所以一共修改 6 个 xml 文件。
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
配置文件 1biserver-ce/pentaho-solutions/system/applicationContext-spring-security-jdbc.xml
修改如下(红色部分位修改过的):
class="org.springframework.jdbc.datasource.DriverManagerDataSource"> value=" jdbc:mysql://localhost:3306/hibernate " /> 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 biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml 修改如下(红色部分位修改过的): system/hibernate/mysql5.hibernate.cfg.xml 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 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 "/> 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 平台。在浏览器输入: localhost : 8080/pentaho 就会进去像第一节的页面就说明一直成功。
查看更多关于pentaho5.0.1将数据库移植成mysql的详细内容...