• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

pentaho5.0.1将数据库移植成mysql

mysql 搞代码 4年前 (2022-01-09) 24次浏览 已收录 0个评论

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

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

<bean id="dataSource"

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

<property name="driverClassName" value="com.mysql.jdbc.Driver” />

<property name="url"

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:3本文来源gaodai#ma#com搞*代#码9网#306/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

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

<Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"

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” />

<Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"

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

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

<Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource"

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” />

<Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource"

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就会进去像第一节的页面就说明一直成功。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:pentaho5.0.1将数据库移植成mysql

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址