简体   繁体   English

将 Pentaho 连接到 mysql 数据库(本地主机)

[英]Connecting Pentaho to mysql database (localhost)

I download last version of MySQL jdbc connector (mysql-connector-java-8.0.13) and I put it in the following folders:我下载了最新版本的 MySQL jdbc 连接器 (mysql-connector-java-8.0.13) 并将其放在以下文件夹中:

  • C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib and C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib 和
  • C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib\\jdbc C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib\\jdbc

And it shows me the following error:它向我显示了以下错误:

    Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
    org.gjt.mm.mysql.Driver


    org.pentaho.di.core.exception.KettleDatabaseException: 
    Error occurred while trying to connect to the database

While, when I introduced the old version file (mysql-connector-java-5.1.34-bin) at the same folders as said before (above).而,当我在之前所说的相同文件夹中引入旧版本文件(mysql-connector-java-5.1.34-bin)时(上图)。 Pentaho shows me the following error: Pentaho 向我展示了以下错误:

    Error connecting to database: (using class org.gjt.mm.mysql.Driver)
    Could not create connection to database server.

    org.pentaho.di.core.exception.KettleDatabaseException: 
    Error occurred while trying to connect to the database

can someone help me?有人能帮我吗?

Thank you!谢谢!

Finally I manage to solve the error.最后我设法解决了错误。

I put my jdbc connector (mysql-connector-java-8.0.13) into the following folder:我将 jdbc 连接器(mysql-connector-java-8.0.13)放入以下文件夹:

  • C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib an C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib an

And I change the name of my MySQL DB.我更改了我的 MySQL 数据库的名称。

Thank you谢谢

  • Stop Report Designer停止报表设计器
  • Remove it from the 'C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib\\jdbc' directory从'C:\\Users\\maria\\Desktop\\report-designer\\report-designer\\lib\\jdbc'目录中删除它
  • Restart Report designer重启报表设计器

You can only have one jdbc driver in the lib directory for the db. db 的 lib 目录中只能有一个 jdbc 驱动程序。 So when you add the 5.1.34 driver, you are adding a second MySQL driver, causing that second error.因此,当您添加 5.1.34 驱动程序时,您正在添加第二个 MySQL 驱动程序,从而导致第二个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM