Kettle连接MySQL数据库出现问题,连接不上的解决方法

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介: 使用Kettle连接MySQL数据库,发生了错误

本文转自IT摆渡网欢迎转载,请标明出处
摆渡网

更多mysq文章请阅读

mysql数据库问题解决

使用Kettle连接MySQL数据库,发生了错误,废话不多说,直接上图:
QQ_20170817162617
  错误信息:

  错误连接数据库 [tcc] : org.pentaho.di.core.exception.KettleDatabaseException:

  Error occurred while trying to connect to the database

  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

  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

  at org.pentaho.di.core.database.Database.normalConnect(Database.Java:428)

  at org.pentaho.di.core.database.Database.connect(Database.java:358)

  at org.pentaho.di.core.database.Database.connect(Database.java:311)

  at org.pentaho.di.core.database.Database.connect(Database.java:301)

  at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)

  at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2686)

  at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:546)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)

  at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)

  at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)

  at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)

  at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:138)

  at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)

  at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)

  at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)

  at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)

  at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)

  at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)

  at org.eclipse.jface.window.Window.open(Window.java:796)

  at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:389)

  at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:318)

  at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)

  at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:59)

  at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:464)

  at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:451)

  at org.pentaho.di.ui.spoon.Spoon.newConnection(Spoon.java:8728)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)

  at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)

  at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)

  at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43)

  at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106)

  at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)

  at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)

  at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)

  at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)

  at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)

  at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)

  at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)

  at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)

  at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1319)

  at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939)

  at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9190)

  at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:654)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)

  Caused by: org.pentaho.di.core.exception.KettleDatabaseException:

  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

  at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:522)

  at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:4697)

  at org.pentaho.di.core.database.Database.normalConnect(Database.java:414)

  ... 55 more

  Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

  at java.NET.URLClassLoader$1.run(URLClassLoader.java:202)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

  at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:497)

  ... 57 more

  主机名 : 210.17.19.79

  端口 : 3306

  数据库名:test

  错误信息显示是jar包未安装,有问题找百度:

  下载jar包:mysql-connector-java-5.1.15-bin.jar

  放到Kettle安装目录下:D:kettledata-integrationlib

  重启Spoon.bat问题解决:
QQ_20170817162750

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
itkeke
+关注
目录
打赏
0
0
0
0
1
分享
相关文章
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
YashanDB数据库服务端SSL连接配置
YashanDB支持通过SSL连接确保数据传输安全,需在服务端生成根证书、服务器证书及DH文件,并将根证书提供给客户端以完成身份验证。服务端配置包括使用OpenSSL工具生成证书、设置SSL参数并重启数据库;客户端则需下载根证书并正确配置环境变量与`yasc_env.ini`文件。注意:启用SSL后,所有客户端必须持有根证书才能连接,且SSL与密码认证独立运行。
【Oracle】使用Navicat Premium连接Oracle数据库两种方法
以上就是两种使用Navicat Premium连接Oracle数据库的方法介绍,希望对你有所帮助!
110 28
在C++的QT框架中实现SQLite数据库的连接与操作
以上就是在C++的QT框架中实现SQLite数据库的连接与操作的基本步骤。这些步骤包括创建数据库连接、执行SQL命令、处理查询结果和关闭数据库连接。在实际使用中,你可能需要根据具体的需求来修改这些代码。
96 13
【YashanDB知识库】Kettle迁移MySQL到YashanDB
本文介绍了使用Kettle将MySQL数据库中的中文数据迁移到YashanDB的方法,解决因YMP不支持Latin1字符集导致的乱码问题。提供了Windows和Linux两种环境下的操作步骤,包括配置JAVA环境、解压作业包、设置数据库连接(MySQLInput与YashanOutput)、修改表列表配置文件及运行迁移任务。Windows环境支持图形界面便于调试,Linux环境网络性能更优。通过详细的操作指南,确保数据迁移成功并可重试无冲突。
【YashanDB知识库】YDC连接数据库报错yasdb return code is zero
【YashanDB知识库】YDC连接数据库报错yasdb return code is zero
如何排查和解决PHP连接数据库MYSQL失败写锁的问题
通过本文的介绍,您可以系统地了解如何排查和解决PHP连接MySQL数据库失败及写锁问题。通过检查配置、确保服务启动、调整防火墙设置和用户权限,以及识别和解决长时间运行的事务和死锁问题,可以有效地保障应用的稳定运行。
177 25
【YashanDB 知识库】YashanDB 支持 MySQL 多表更新语句的解决方法
【YashanDB 知识库】YashanDB 支持 MySQL 多表更新语句的解决方法
【YashanDB知识库】YashanDB 支持MySQL多表更新语句的解决方法
本文介绍了在YashanDB中处理MySQL多表更新语句的方法。由于YashanDB默认不支持多表更新(报错YAS-04344),可通过启用兼容性参数`SQL_PLUGIN = 'MYSQL'`解决,或改写SQL语句实现相同功能。文章通过具体示例说明了多种改写方法,包括根据共同列更新单个或多个字段、添加过滤条件以及基于多个共同列的更新场景。涉及的表结构和数据展示了实际操作过程,帮助用户顺利迁移和使用YashanDB。

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等