kettle连接mysql
kettle连接mysql时出现问题
错误信息如下:
- 错误连接数据库 [test] : org.pentaho.di.core.exception.KettleDatabaseException:
- Error occurred while trying to connect to the database
- Error connecting to database: (using class org.gjt.mm.mysql.Driver)
- null, message from server: "Host '127.0.0.1' is not allowed to connect to this MySQL server"
- org.pentaho.di.core.exception.KettleDatabaseException:
- Error occurred while trying to connect to the database
- Error connecting to database: (using class org.gjt.mm.mysql.Driver)
- null, message from server: "Host '127.0.0.1' is not allowed to connect to this MySQL server"
- at org.pentaho.di.core.database.Database.normalConnect(Database.java:)
- at org.pentaho.di.core.database.Database.connect(Database.java:)
- at org.pentaho.di.core.database.Database.connect(Database.java:)
- at org.pentaho.di.core.database.Database.connect(Database.java:)
- at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:)
- at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:)
- at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
- at java.lang.reflect.Method.invoke(Method.java:)
- at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:)
- at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:)
- at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:)
- at org.pentaho.ui.xul.swt.tags.SwtButton.access$(SwtButton.java:)
- at org.pentaho.ui.xul.swt.tags.SwtButton$.widgetSelected(SwtButton.java:)
- 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:)
- at org.eclipse.jface.window.Window.open(Window.java:)
- at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:)
- at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:)
- at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:)
- at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:)
- at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:)
- at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:)
- at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon.access$(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon$.widgetDefaultSelected(Spoon.java:)
- 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.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:)
- at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
- at java.lang.reflect.Method.invoke(Method.java:)
- at org.pentaho.commons.launcher.Launcher.main(Launcher.java:)
- Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
- Error connecting to database: (using class org.gjt.mm.mysql.Driver)
- null, message from server: "Host '127.0.0.1' is not allowed to connect to this MySQL server"
- at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:)
- at org.pentaho.di.core.database.Database.normalConnect(Database.java:)
- ... more
- Caused by: java.sql.SQLException: null, message from server: "Host '127.0.0.1' is not allowed to connect to this MySQL server"
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:)
- at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:)
- at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:)
- at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:)
- at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:)
- at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:)
- at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:)
- at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
- at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:)
- at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:)
- at java.lang.reflect.Constructor.newInstance(Constructor.java:)
- at com.mysql.jdbc.Util.handleNewInstance(Util.java:)
- at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:)
- at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:)
- at java.sql.DriverManager.getConnection(DriverManager.java:)
- at java.sql.DriverManager.getConnection(DriverManager.java:)
- at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:)
- ... more
主机名 : localhost
端口 : 3306
数据库名:mysql
在网上搜了好多都说mysql-connector-java-5.1.26-bin没有在/data-integration/lib或者/data-integration/libswt/win64/下
但是上图可以看出我的jar包已在/data-integration/lib下
最后,解决方法是:
1. root使用密码123456(密码自己设置强度高点)从任何主机连接到mysql服务器的话。
- mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;
- Query OK, 0 rows affected (0.00 sec)
- mysql> FLUSH PRIVILEGES;
- Query OK, 0 rows affected (0.00 sec)
2. 允许用户root从的主机连接到mysql服务器,并使用123456作为密码
- mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;
- Query OK, 0 rows affected (0.00 sec)
- mysql> FLUSH PRIVILEGES;
- Query OK, 0 rows affected (0.00 sec)
3. 允许用户root从ip为127.0.0.2的主机连接到mysql服务器的dk数据库,并使用123456作为密码
- mysql> GRANT ALL PRIVILEGES ON dk.* TO 'root'@'127.0.0.2' IDENTIFIED BY '' WITH GRANT OPTION;
- Query OK, 0 rows affected (0.00 sec)
- mysql> FLUSH PRIVILEGES;
- Query OK, 0 rows affected (0.00 sec)
授权完成后,再一次连接成功。
kettle连接mysql的更多相关文章
- kettle连接mysql数据库并进行数据分析
1.数据库链接驱动 如果没有安装对应的数据库链接驱动,在数据库链接的过程中,可能会报某个数据库连接找不到的异常,因此需要下载对应驱动后(安装步骤可以参见“怎么在官网上下载java连接mysql的驱动j ...
- Kettle连接MySQL错误:OPTION SQL_SELECT_LIMIT=DEFAULT
由于升级了MySQL到5.6,运行ETL报错: OPTION SQL_SELECT_LIMIT=DEFAULT 上网查询原来是MySQL的驱动版本不一致,之前的驱动不支持这样的写法,于是上网下载对应的 ...
- kettle 连接 mysql 出错 Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the ……
解决办法:1: 首先,到官网下载mysql-connector-java. 2: 把驱动文件放置在data-integration\lib\ 目录下
- kettle通过SSH连接Mysql数据库(SSH隧道)
kettle通过SSH连接Mysql数据库(SSH隧道) Kettle无法直接连接使用SSH通道的MySQL,通过SSH隧道(推荐)或者需要借助工具PuTTY(不用时需要注销不推荐),具体操作如下所示 ...
- Python 2.7_pandas连接MySQL数据处理_20161229
在我本地Mysql_local_db数据库建立了一个pandas数据表用来对pandas模块的学习 学习过程借鉴学习蓝鲸的网站分析笔记 1.创建表 CREATE TABLE pandastest( 城 ...
- nodejs进阶(6)—连接MySQL数据库
1. 建库连库 连接MySQL数据库需要安装支持 npm install mysql 我们需要提前安装按mysql sever端 建一个数据库mydb1 mysql> CREATE DATABA ...
- 【初学python】使用python连接mysql数据查询结果并显示
因为测试工作经常需要与后台数据库进行数据比较和统计,所以采用python编写连接数据库脚本方便测试,提高工作效率,脚本如下(python连接mysql需要引入第三方库MySQLdb,百度下载安装) # ...
- Node.js Express连接mysql完整的登陆注册系统(windows)
windows学习环境: node 版本: v0.10.35 express版本:4.10.0 mysql版本:5.6.21-log 第一部分:安装node .Express(win8系统 需要&qu ...
- PDO连接mysql数据库
1.PDO简介 PDO(PHP Data Object) 是PHP 5 中加入的东西,是PHP 5新加入的一个重大功能,因为在PHP 5以前的php4/php3都是一堆的数据库扩展来跟各个数据库的连接 ...
随机推荐
- yarn的调度器
三种调度器 1.FIFO Scheduler 把应用按提交的顺序排成一个队列,这是一个先进先出队列,在进行资源分配的时候,先给队列中最头上的应用进行分配资源,等最前面的应用需求满足后再给下一个分配,以 ...
- android studio依赖库工程Activity显示问题及库工程设置
android studio引用库工程其实不难,直接添加依赖module即可,但是我在操作过程中出现一些奇怪的问题,苦扰我一整天,为了祭奠这苦命的一天特别mark一下. 首先描述一下我的错误现象: s ...
- 关于eclipse中代码与SVN服务器关联问题
今天开始开发新项目,此项目采用maven搭建,分多个工程,用eclipse的SVN插件检出工程之后只有一个工程,只好用桌面端的SVN工具检出,然后再import导入到eclipse中直接变成了多个工程 ...
- app兼容性测试的几种方案
1.统计自己的应用被使用的数据 通过友盟或Flurry等在应用嵌入,得到应用在哪些机型上被安装了,排名前十的就是测试的重点机型 2.可参考兼容性测试平台的测试结果 比如Testin或百度的MTC平台, ...
- 用python做中文自然语言预处理
这篇博客根据中文自然语言预处理的步骤分成几个板块.以做LDA实验为例,在处理数据之前,会写一个类似于实验报告的东西,用来指导做实验,OK,举例: 一,实验数据预处理(python,结巴分词)1.对于爬 ...
- C++类的实例化的两种方法
C++ 类的实例化有两种方法: 直接定义对象: 先定义一个类: class A { public: A(); virtual ~A(); ... ... }; 类实现略. 用的时候: A a; ...
- Ddos 攻击
title: Ddos 防御相关 tags: Ddos, 安全, 防御 grammar_cjkRuby: true --- 防御基础 1.1. 攻击流量到底多大 谈到DDoS防御,首先就是要知道到底遭 ...
- Chapter 16_5 单一方法
当一个对象只有一个方法时,可以不用创建接口table,但是要将这个单独的方法作为对象来返回.可以参考迭代器那一节,是如何构造一个迭代器函数,那个函数将状态保存为closure. 一个具有状态的迭代器是 ...
- [其他]win7下chrome浏览器插件导出与导入
下载了某些插件,重装电脑怎么不备份,重装之后怎么再次使用,一文搞定! 导出crx格式备份文件 1.选择 自定义格式及控制 > 更多工具 > 扩展程序: 2.勾选"开发者模式&qu ...
- asp 301代码
<% if request.ServerVariables("HTTP_HOST")="ksfmjy.com" then Response.Status= ...