pentaho mysql_pentaho5.0.1将数据库移植成mysql

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

配置文件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平台。在浏览器输入:localhost:8080/pentaho就会进去像第一节的页面就说明一直成功。

原文:http://blog.csdn.net/yucongyong/article/details/21951297

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值