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

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 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
目录
相关文章
|
30天前
|
关系型数据库 MySQL Java
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
【YashanDB知识库】原生mysql驱动配置连接崖山数据库
|
28天前
|
关系型数据库 MySQL Java
【YashanDB知识库】Kettle迁移MySQL到YashanDB
本文介绍了使用Kettle将MySQL数据库中的中文数据迁移到YashanDB的方法,解决因YMP不支持Latin1字符集导致的乱码问题。提供了Windows和Linux两种环境下的操作步骤,包括配置JAVA环境、解压作业包、设置数据库连接(MySQLInput与YashanOutput)、修改表列表配置文件及运行迁移任务。Windows环境支持图形界面便于调试,Linux环境网络性能更优。通过详细的操作指南,确保数据迁移成功并可重试无冲突。
|
3月前
|
关系型数据库 MySQL 数据库连接
数据库连接工具连接mysql提示:“Host ‘172.23.0.1‘ is not allowed to connect to this MySQL server“
docker-compose部署mysql8服务后,连接时提示不允许连接问题解决
|
2月前
|
关系型数据库 MySQL 网络安全
如何排查和解决PHP连接数据库MYSQL失败写锁的问题
通过本文的介绍,您可以系统地了解如何排查和解决PHP连接MySQL数据库失败及写锁问题。通过检查配置、确保服务启动、调整防火墙设置和用户权限,以及识别和解决长时间运行的事务和死锁问题,可以有效地保障应用的稳定运行。
182 25
|
26天前
|
SQL 关系型数据库 MySQL
【YashanDB 知识库】YashanDB 支持 MySQL 多表更新语句的解决方法
【YashanDB 知识库】YashanDB 支持 MySQL 多表更新语句的解决方法
|
28天前
|
SQL 关系型数据库 MySQL
【YashanDB知识库】YashanDB 支持MySQL多表更新语句的解决方法
本文介绍了在YashanDB中处理MySQL多表更新语句的方法。由于YashanDB默认不支持多表更新(报错YAS-04344),可通过启用兼容性参数`SQL_PLUGIN = 'MYSQL'`解决,或改写SQL语句实现相同功能。文章通过具体示例说明了多种改写方法,包括根据共同列更新单个或多个字段、添加过滤条件以及基于多个共同列的更新场景。涉及的表结构和数据展示了实际操作过程,帮助用户顺利迁移和使用YashanDB。
|
2月前
|
关系型数据库 MySQL 数据库连接
Unity连接Mysql数据库 增 删 改 查
在 Unity 中连接 MySQL 数据库,需使用 MySQL Connector/NET 作为数据库连接驱动,通过提供服务器地址、端口、用户名和密码等信息建立 TCP/IP 连接。代码示例展示了如何创建连接对象并执行增删改查操作,确保数据交互的实现。测试代码中,通过 `MySqlConnection` 类连接数据库,并使用 `MySqlCommand` 执行 SQL 语句,实现数据的查询、插入、删除和更新功能。
|
1月前
|
关系型数据库 MySQL 数据库连接
docker拉取MySQL后数据库连接失败解决方案
通过以上方法,可以解决Docker中拉取MySQL镜像后数据库连接失败的常见问题。关键步骤包括确保容器正确启动、配置正确的环境变量、合理设置网络和权限,以及检查主机防火墙设置等。通过逐步排查,可以快速定位并解决连接问题,确保MySQL服务的正常使用。
280 82
|
4天前
|
SQL 关系型数据库 MySQL
大数据新视界--大数据大厂之MySQL数据库课程设计:MySQL 数据库 SQL 语句调优方法详解(2-1)
本文深入介绍 MySQL 数据库 SQL 语句调优方法。涵盖分析查询执行计划,如使用 EXPLAIN 命令及理解关键指标;优化查询语句结构,包括避免子查询、减少函数使用、合理用索引列及避免 “OR”。还介绍了索引类型知识,如 B 树索引、哈希索引等。结合与 MySQL 数据库课程设计相关文章,强调 SQL 语句调优重要性。为提升数据库性能提供实用方法,适合数据库管理员和开发人员。
|
4天前
|
关系型数据库 MySQL 大数据
大数据新视界--大数据大厂之MySQL 数据库课程设计:MySQL 数据库 SQL 语句调优的进阶策略与实际案例(2-2)
本文延续前篇,深入探讨 MySQL 数据库 SQL 语句调优进阶策略。包括优化索引使用,介绍多种索引类型及避免索引失效等;调整数据库参数,如缓冲池、连接数和日志参数;还有分区表、垂直拆分等其他优化方法。通过实际案例分析展示调优效果。回顾与数据库课程设计相关文章,强调全面认识 MySQL 数据库重要性。为读者提供综合调优指导,确保数据库高效运行。