kettle 连接mysql 数据库失败

kettle连接mysql数据库一直失败 mysql是5.7版本 kettle 7.0 尝试换了很多jar包都不行 网上各种方法都没办法解决
求大神帮看看
问题如下:
图片说明
错误连接数据库 [test1] : 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)
Access denied for user 'root'@'192.168.1.103' to database 'mysqlzsj'

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)
Access denied for user 'root'@'192.168.1.103' to database 'mysqlzsj'

at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)
at org.pentaho.di.core.database.Database.connect(Database.java:370)
at org.pentaho.di.core.database.Database.connect(Database.java:341)
at org.pentaho.di.core.database.Database.connect(Database.java:331)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2783)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:597)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:137)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.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.di.ui.xul.KettleDialog.show(KettleDialog.java:80)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:47)
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:60)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:485)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:472)
at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3073)
at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3043)
at org.pentaho.di.ui.spoon.Spoon.access$2300(Spoon.java:361)
at org.pentaho.di.ui.spoon.Spoon$26.widgetDefaultSelected(Spoon.java:6184)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.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:1366)
at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:8022)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9277)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:692)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)

Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
Error connecting to database: (using class org.gjt.mm.mysql.Driver)
Access denied for user 'root'@'192.168.1.103' to database 'mysqlzsj'

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:585)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:456)
... 48 more

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'root'@'192.168.1.103' to database 'mysqlzsj'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:395)
at com.mysql.jdbc.Util.getInstance(Util.java:370)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:927)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1709)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1252)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2470)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2503)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2288)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:818)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:395)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:567)
... 49 more

主机名 : DESKTOP-FKLDHDK
端口 : 3306
数据库名:MySQLZsj

7个回答

有两种原因导致连接不上:
1、mysql的驱动包要和Kettle的版本对应,否则是连接不上的。
2、mysql的访问权限是否开启

qq_32823245
qq_32823245 是jar版本太低了 今天换了比较新的就可以了 谢谢
一年多之前 回复

数据库的root的权限没有开,要设置成外网可以访问,或者设置成指定ip

我试过开主机权限 开了之后还是不行 能不能说下具体怎么操作

及后还凑合的是但是v

SQLPlus进去,然后执行下面这句话,然后再用kettle连接测试
GRANT ALL PRIVILEGES ON . TO 'root'@'192.168.1.103’ IDENTIFIED BY '' WITH GRANT OPTION;

可以先用数据库连接工具连接看是否正常,比如Navicat,如果OK,则可能是数据库驱动的问题。

先看看mysql查询客户端能不能链接成功

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
kettle连接mysql异常处理
kettle连接mysql数据库时,抛出异常:Communications link failure The last packet sent successfully to the server, The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
Kettle连接MySQL数据库出现问题,连接不上
使用Kettle连接MySQL数据库,发生了错误,废话不多说,直接上图: 错误信息: 错误信息显示是jar包未安装,有问题找百度: 下载jar包:mysql-connector-java-5.1.15-bin.jar 放到Kettle安装目录下:D:\kettle\data-integration\lib 重启Spoon.bat问题解决:
Python 连接MySQL 数据库失败
python3+ 连接Mysql 出现“10061 由于计算机积极拒绝,无法连接”的错误
kettle连接多个数据库
把对应的jar包放到解压文件的lib文件夹就行
kettle连接gbase数据库
背景:kettle作为一个高效的数据抽取工具,工作中经常用来抽取数据,自带一些mysql、oracle的连接就不说了,作为一个纯java的软件,连接gbase,依赖一个gbase的连接驱动就好了。1.安装好kettle软件2.如下图,将准备好的gbase驱动jar放入如下目录。D:\kettle_20150824\data-integration\libext\JDBC3.kettle_20150...
kettle连接神通数据库
各位前辈,我是新人,现在在做异构数据连接的毕业设计,kettle连接神通数据库的接口信息不懂,还有jdbc驱动包有也发我一下,网上这些资源好匮乏啊。谢谢啦,一定重谢 。rn[img=https://img-bbs.csdn.net/upload/201405/11/1399801653_331814.png][/img]
关于 kettle 连接 mysql 的一些问题
关于 kettle 连接 mysql 的一些问题 参考URL: http://kcd.nivalsoul.cn/article/1543471574567 对于 5.7 及以下版本的 mysql,jdbc 驱动使用 mysql-connector-java-5.1.x.jar,在数据库连接的地方,选择 MySQL,JDBC 方式 官方下载有两个jar 不要使用带 bin 的 jar!否则可能会出...
kettle连接mysql时报错
错误连接数据库 [1] : org.pentaho.di.core.exception.KettleDatabaseException: rnError occured while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnAccess denied for user 'root'@'suwb-PC' (using password: YES)rnrnrnorg.pentaho.di.core.exception.KettleDatabaseException: rnError occured while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnAccess denied for user 'root'@'suwb-PC' (using password: YES)rnrnrnrn怎么回事啊 我可以保证密码是对的 我能用这个密码登陆mysqlrnrn貌似有不少人也遇到过这个问题 网上一搜一大堆 但是完全没有解决我的问题 很多人说修改密码什么的 我照着操作也改不了 总出问题 还有人说重装什么的 我很怀疑重装能不能解决这个问题 我的mysql本来就是今天刚装的 rnrnrn求各位大神救助!!!
kettle连接sqlserver数据库(jar包)
sqljdbc地址:http://mvnrepository.com/artifact/microsoft/sqljdbc  sqljdbc4地址:http://www.java2s.com/Code/Jar/s/Downloadsqljdbc420jar.htm      下载完成之后,放在kettle安装包下面的lib目录下...
连接mysql向数据库插入数据失败
rn我用MFC连接了MYSQLrn连接和查询都没有问题,但是在向数据库插入数据时发生错误。rnrnrn我测试时发现,只要将m_csFileName变得很短,也就是把sql语句变短,它就可以顺利插入数据库rn我也检查了是不是数据库中列的长度太小,插不进去,调到很大还是崩溃。rnmysql_query和 mysql_real_query都试过了,都不行。rn 我用mysql_error(&mysql)输出错误信息,如果是用mysql_query显示没有查到数据, 用mysql_real_query显示我的sql语句有问题,请检查' ' 附近;rnrn请问是怎么回事?怎么解决呢?rn代码如下:rn[code=c]CString m_csFileName(_T("C:\\Users\\mac\\Documents\\C++程序\\FEA-Aid2 - Test\\x64\Debug\\RecordVoice\\test.wav"));rnrn mysql_set_character_set(&mysql, "gbk");rn CString insert(_T("insert into hospital_chat(path,user_id) values('"));rn insert += m_csFileName;rnrn insert += _T("','2')");rn rn // Cstring转const char*rn const size_t strsize = (insert.GetLength() + 1) * 2; // 宽字符的长度;rn rn char * pstr = new char[strsize]; //分配空间;rn size_t sz = 0;rn wcstombs_s(&sz, pstr, strsize, insert, _TRUNCATE);rn int n = atoi((const char*)pstr); // 字符串已经由原来的CString 转换成了 const char*rn rn int res2 = mysql_query(&mysql, pstr);rn //int res2 = mysql_real_query(&mysql, pstr,insert.GetLength());rn rn if (!res2)rn results= mysql_store_result(&mysql);rn rn elsern cout << "失败";rn results = NULL;rn cout << mysql_error(&mysql);rn [/code]
Kettle连接ORACLE失败,报错IO异常:
之前用kettle从测试环境抽数据,连接的是oracle数据库,没有任何问题。今天,经理让我从生产环境抽数,于是我把之前连接的主机名称改成生产环境的地址,换一下用户名密码,其它不变(如:数据库名称)。连接时报错如下图: 感到很纳闷,用户名和密码都是正确的,测试环境可以连,怎么换个IP就失败了。 通过检查,觉得应该是错在连接ORACLE的SID上。我觉得kettle连接ORALCE应该是
kettle连接hive成功但是查询失败
hive sql 语句 select * from shujurn错误信息如下:rnorg.pentaho.di.core.exception.KettleDatabaseException:rnAn error occurred executing SQL:rnselect * from shujurnrnError determining value metadata from SQL resultset metadatarnMethod not supportedrnrnrn at org.pentaho.di.core.database.Database.openQuery(Database.java:1718)rn at org.pentaho.di.core.database.Database.getRows(Database.java:3398)rn at org.pentaho.di.core.database.Database.getRows(Database.java:3376)rn at org.pentaho.di.core.database.Database.getRows(Database.java:3361)rn at org.pentaho.di.ui.core.database.dialog.SQLEditor.exec(SQLEditor.java:372)rn at org.pentaho.di.ui.core.database.dialog.SQLEditor.access$200(SQLEditor.java:81)rn at org.pentaho.di.ui.core.database.dialog.SQLEditor$7.handleEvent(SQLEditor.java:242)rn at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)rn at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1347)rn at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7989)rn at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9269)rn at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:662)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)rnCaused by: org.pentaho.di.core.exception.KettleDatabaseException:rnError determining value metadata from SQL resultset metadatarnMethod not supportedrnrn at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromSQLType(ValueMetaBase.java:4588)rn at org.pentaho.di.core.database.Database.getValueFromSQLType(Database.java:2267)rn at org.pentaho.di.core.database.Database.getRowInfo(Database.java:2229)rn at org.pentaho.di.core.database.Database.openQuery(Database.java:1714)rn ... 19 morernCaused by: java.sql.SQLException: Method not supportedrn at org.apache.hive.jdbc.HiveResultSetMetaData.isSigned(HiveResultSetMetaData.java:143)rn at org.pentaho.di.core.row.value.ValueMetaBase.getValueFromSQLType(ValueMetaBase.java:4355)rn ... 22 more
kettle 连接 sybase 失败 求教!急!
描述 :rn 使用以下2种方式都失败。大家说的 各类 驱动问题都换过 。(JDBC 情况下,特征列表值为 :Driver Class: net.sourceforge.jtds.jdbc.Driver Url: jdbc:jtds:sybase://192.168.6.121:2638/ddw 我怀疑是这个写法问题)rnrn 1 使用JDBC连接成功 ,但是查询数据库 报错 如下:rnrn因为错误不能提取数据库信息rnrnError getting views from schema [null]rnInvalid state, the Connection object is closed.rnrnrn 2 使用ODBC连接报错 如下 :rn错误连接数据库 [wuerp] : org.pentaho.di.core.exception.KettleDatabaseException: rnError occurred while trying to connect to the databasernrnError connecting to database: (using class sun.jdbc.odbc.JdbcOdbcDriver)rn at org.pentaho.commons.launcher.Launcher.main (Launcher.java:92)rn at java.lang.reflect.Method.invoke (null:-1)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke (null:-1)rn at sun.reflect.NativeMethodAccessorImpl.invoke (null:-1)rn at sun.reflect.NativeMethodAccessorImpl.invoke0 (null:-2)rn at org.pentaho.di.ui.spoon.Spoon.main (Spoon.java:653)rn at org.pentaho.di.ui.spoon.Spoon.start (Spoon.java:9214)rn at org.pentaho.di.ui.spoon.Spoon.waitForDispose (Spoon.java:7939)rn at org.pentaho.di.ui.spoon.Spoon.readAndDispatch (Spoon.java:1339)rn at org.eclipse.swt.widgets.Display.readAndDispatch (null:-1)rn at org.eclipse.swt.widgets.Display.runDeferredEvents (null:-1)rn at org.eclipse.swt.widgets.Widget.sendEvent (null:-1)rn at org.eclipse.swt.widgets.EventTable.sendEvent (null:-1)rn at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:402)rn at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionCo
eclipse连接MySQL失败
Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driverrn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at itcast.Demo.JDBCDemo.main(JDBCDemo.java:26)rnEclipse中显示以上问题无法解决,求救!
连接mysql失败
java程序中连接mysql失败,提示找不到驱动类,我已经在classpath里配置了驱动类的jar包位置,为什么还是失败啊,求解!
Navicat连接mysql失败
1:2003错误 不能连接到mysql服务 解决方法:在Windows服务中将mysql服务手动打开或右键设置为开机延迟启动(连接失败一次后再连接即可成功连接) 后续待补充
php 连接mysql失败
复制以下代码粘贴至conn_mysql.php文件,把“你的密码”改成你的mysql密码rnalert('数据库连接正常');";rnrnelsern echo " ";rn rn?>rnrn在浏览器里输入:http://127.0.0.1/conn_mysql.php后失败rn显示:Not FoundrnrnThe requested URL /conn_mysql.php was not found on this server.rn这是怎么回事,本人是菜鸟,求大侠们知道。rn
Qt连接MySQL失败
Windows 10 Qt5.5 mingw492_32 MySQL5.7  64位 连接数据库失败,提示未加载MySQL驱动,但是自Qt5.3?以后是自带MySQL驱动的 查阅资料发现可能的问题是Qt自带驱动不兼容,依赖什么的不完整,好吧重新编译驱动.下载了Qt源代码和MySQL源代码,此刻意识到一个问题,MySQL是64位的,其动态链接库libmysql.dll应该也是64位版本的?
myeclipse连接mysql失败
连接mysql unable to creat connection.check your urlrn[img=https://img-bbs.csdn.net/upload/201605/05/1462441253_2186.png][/img]
Repository连接MySQl失败
Repository连接MySQl失败rnrn菜单:Repository--User就是灰的rnrnODBC已经连接测试成功rn但是需要建立Repository用户
QT 连接MYSQL失败
#include rnrn QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL");rn db.setHostName("localhost"); //设置主机地址rn db.setPort(3360); //设置端口rn db.setDatabaseName("test"); //设置数据库名称rn db.setUserName("root"); //设置用户名rn db.setPassword("123456"); //设置密码rn if(!db.open())rn qDebug()<<"连接失败";rn elsern qDebug()<<"连接成功";rn rnrn连接失败。。驱动加载没错误,数据库名,用户名密码都对。这个为什么呢?
连接异地 mysql 失败
异地服务器响应时间超时,导致连接失败 1. nacicat 连接 需要配置 使用压缩 2、 jdbc 连接设置 jdbc url 后加上 useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useSSL=false&amp;amp;autoReconnect=true&amp;amp;failOverReadOnly=false      ...
Myeclipse 连接 MySQL失败
[code=Java]rnimport java.sql.*;rnpublic class Connet rn public static void main(String[] args) rn String Driver="com.mysql.jdbc.Driver";rn String url="jdbc:mysql://localhost:3306/library";rn String user="root"; rn String password="123456"; rn Statement stmt; ResultSet res;rn tryrn rn Class.forName(Driver);rn rn catch(Exception e)rn rn System.out.println("无法加载驱动程序"+Driver);rn rn tryrn rn Connection con=DriverManager.getConnection(url,user,password);rn stmt=con.createStatement();rn res=stmt.executeQuery("select * from books");rn while(res.next())rn rn String name=res.getString("name");rn System.out.println(name);rn rn res.close();rn rn catch(SQLException ee)rn rn System.out.println("连接失败");rn rn rnrn[/code]rn我已经加载了Mysql的驱动包,并且系统也没报错,就是显示“连接失败”,无法显示要查询的内容。这是为什么呢?用的是Myeclipse6.0.1版本的。
连接sqlserver2005数据库失败?
[code=C/C++]HRESULT hr;rn tryrn rn hr = m_pConnection.CreateInstance("ADODB.Connection");///创建Connection对象rn if(SUCCEEDED(hr))rn rn hr = m_pConnection->Open("Provider=SQLOLEDB.1;Data Source=71A5E5EC09B449B\\administrator;Database=TTIM4;Trusted_Connection=yes","","",adModeUnknown);///连接数据库rn ///上面一句中连接字串中的Provider是针对ACCESS2000环境的,对于ACCESS97,需要改为:Provider=Microsoft.Jet.OLEDB.3.51; rn rn rn catch(_com_error e)///捕捉异常rn rn CString errormessage;rn errormessage.Format(L"连接数据库失败!\r\n错误信息:%s",e.ErrorMessage());rn AfxMessageBox(errormessage);///显示错误信息rn return FALSE;rn [/code]rn怎么回事?谢谢!!
连接远端数据库失败
development:rn adapter: mysqlrn encoding: utf8rn database: namern username: userrn password: 123456rn host: 10.20.128.152rnrn这样配置数据库来访问内网其他机器的数据库!rn报错!rnrnMysql::Error (Client does not support authentication protocol requested by server; consider upgrading MySQL client):rn c:/ruby/lib/ruby/1.8/mysql.rb:453:in `read'rn c:/ruby/lib/ruby/1.8/mysql.rb:130:in `real_connect'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1080:in `columns'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1088:in `columns_hash'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:63:in `define_attribute_methods'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:290:in `respond_to?'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:133:in `dump'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:133:in `marshal'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:111:in `close'rn c:/ruby/lib/ruby/1.8/cgi/session.rb:324:in `close'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1247:in `close_session'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1292:in `process_cleanup_without_flash'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/flash.rb:173:in `process_cleanup_without_session_management_support'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:133:in `process_cleanup_without_components'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/components.rb:161:in `process_cleanup'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:532:in `process_without_filters'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:112:in `handle_dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in `service'rn c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'rn c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/webrick.rb:66rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'rn script/server:3rnrn/!\ FAILSAFE /!\ 2010年08月20日 15时29分rn Status: 500 Internal Server Errorrn Client does not support authentication protocol requested by server; consider upgrading MySQL clientrn c:/ruby/lib/ruby/1.8/mysql.rb:453:in `read'rn c:/ruby/lib/ruby/1.8/mysql.rb:130:in `real_connect'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1080:in `columns'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1088:in `columns_hash'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:63:in `define_attribute_methods'rn c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:290:in `respond_to?'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:133:in `dump'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:133:in `marshal'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session/cookie_store.rb:111:in `close'rn c:/ruby/lib/ruby/1.8/cgi/session.rb:324:in `close'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1247:in `close_session'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1292:in `process_cleanup_without_flash'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/flash.rb:173:in `process_cleanup_without_session_management_support'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:133:in `process_cleanup_without_components'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/components.rb:161:in `process_cleanup'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:532:in `process_without_filters'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'rn c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:112:in `handle_dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:in `service'rn c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'rn c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'rn c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:in `dispatch'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/webrick.rb:66rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'rn c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'rn c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'rn c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'rn script/server:3rn
连接sql2005数据库失败
[code=c]BOOL CLZJDataBase::doQuery(CString strSQL, _RecordsetPtr &pRecordset)rn rn if (m_bOpened == FALSE) return FALSE;rn pRecordset.CreateInstance(__uuidof(Recordset));rn pRecordset->CursorLocation = adUseClient;rn HRESULT hr;rn tryrn rn hr = pRecordset->Open(_bstr_t(strSQL), m_Connection.GetInterfacePtr(), adOpenForwardOnly, adLockReadOnly, adCmdText); rn rn catch (_com_error e) rn rn CString strValue;rn CString strDNS = GetConnectString();rn m_Connection->Close();rn m_Connection.Release();rn rn strValue.Format(_T("<%s> %s--------\n"), GetTime(), strDNS); rn GWriteLog(strValue);rn rn HRESULT hr = m_Connection.CreateInstance(__uuidof(Connection));rn hr = m_Connection->Open(_bstr_t(strDNS), "", "", -1); rn rn strValue.Format(_T("<%s> ReConnect---------- SQL = %s\n"), GetTime(), strSQL); rn GWriteLog(strValue);rn rn if(FAILED(hr))rn rn CString strValue;rn strValue.Format(_T("<%s> Reconnect Error---------- SQL = %s\n"), GetTime(), strSQL); rn GWriteLog(strValue); rn _tprintf(strValue); rn return FALSE;rn rn elsern rn m_bOpened = TRUE;rn hr = pRecordset->Open(_bstr_t(strSQL), m_Connection.GetInterfacePtr(), adOpenForwardOnly, adLockReadOnly, adCmdText);rn return TRUE;rn rn rn return TRUE;rnrnCString CLZJDataBase::GetConnectString()rnrn CString strIP;rn GetPrivateProfileString(_T("DataBase"), _T("IP"), _T(""), strIP.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "\\config.ini");rn strIP.ReleaseBuffer();rn strIP.TrimLeft();rn strIP.TrimRight();rn rn CString strPort;rn GetPrivateProfileString(_T("DataBase"), _T("PORT"), _T(""), strPort.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "\\config.ini");rn strPort.ReleaseBuffer();rn strPort.TrimLeft();rn strPort.TrimRight();rn rn CString strDB;rn GetPrivateProfileString(_T("DataBase"), _T("DB"), _T(""), strDB.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "\\config.ini");rn strDB.ReleaseBuffer();rn strDB.TrimLeft();rn strDB.TrimRight();rn rn CString strLoginName;rn GetPrivateProfileString(_T("DataBase"), _T("LoginName"), _T(""), strLoginName.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "\\config.ini");rn strLoginName.ReleaseBuffer();rn strLoginName.TrimLeft();rn strLoginName.TrimRight();rn rn CString strPassword;rn GetPrivateProfileString(_T("DataBase"), _T("Password"), _T(""), strPassword.GetBufferSetLength(MAX_PATH), MAX_PATH, getPath() + "\\config.ini");rn strPassword.ReleaseBuffer();rn strPassword.TrimLeft();rn strPassword.TrimRight();rn rn CString strDNS = "Provider=SQLOLEDB;SERVER=" + strIP + _T(",") + strPort + "; DATABASE=" + strDB + ";UID="+strLoginName+";PWD=" + strPassword; //不能有空格rn return strDNS;rn[/code]rn[img=https://img-bbs.csdn.net/upload/201311/29/1385686918_298351.jpg][/img]rnrnconfig.inirn[code=css][DataBase]rnLoginName=sa rnPassword=123rnIP=71A5E5EC09B449B\\XIAOYErnDB=yschatrnPort=2820rn[software]rnver=100rntcpport=8500rnServerType=0rn[FtpServer]rnIP=127.0.0.1rnport=21rnname=xiaoyernpassword=123[/code]rn提示连接失败,怎么办?谢谢!
连接SQL数据库失败
服务器错误' / '应用程序。rnrn--------------------------------------------------------------------------------rnrn一个网络或特定实例发生错误,同时建立一个连接到服务器。服务器不存在或不可访问。验证实例名称是正确的,服务器配置为允许远程连接。(提供者:命名管道供应商,误差:40 -无法打开一个连接到服务器)rn描述:一个未处理的异常发生在执行当前请求。请检查堆栈跟踪信息有关该错误以及它起源于代码。rnrn异常详细信息:system.data.sqlclient.sqlexception:与网络有关的或特定实例发生错误,同时建立一个连接到服务器。服务器不存在或不可访问。验证实例名称是正确的,服务器配置为允许远程连接。(提供者:命名管道供应商,误差:40 -无法打开一个连接到服务器)rnrn源错误:rnrn一个未处理的异常是在执行当前请求。信息的起源和异常的位置可确定使用下面的异常堆栈跟踪。rnrn把项目发布到服务器上后,修改了webconfig里的数据库链接字符,还是有错
连接本地数据库失败
我在服务器上将程序和数据库下载下来了 数据库附加到我本地的数据库里了 rn我也将config文件修改成了连接我本地的数据了 rn可是为什么一连接的时候 就会出现以下的错误 rnrnOffending URL: http://localhost:1104/default.aspxrnSource: .Net SqlClient Data Providerrn[b]Message: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL 网络接口, error: 26 - 定位指定的服务器/实例时出错)[/b]rnStack trace: 在 JumboTCMS.UI.BasicPage.ConnectDb() 位置 D:\Documents\Desktop\备份www.bhjb.so\JumboTCMS_V5.1.0\JumboTCMS_V5.1.0\JumboTCMS_WebWAN\JumboTCMS.UI\BasicPage.cs:行号 122rn 在 JumboTCMS.UI.BasicPage.LoadJumboTCMS() 位置 D:\Documents\Desktop\备份www.bhjb.so\JumboTCMS_V5.1.0\JumboTCMS_V5.1.0\JumboTCMS_WebWAN\JumboTCMS.UI\BasicPage.cs:行号 47rn 在 JumboTCMS.UI.BasicPage.OnInit(EventArgs e) 位置 D:\Documents\Desktop\备份www.bhjb.so\JumboTCMS_V5.1.0\JumboTCMS_V5.1.0\JumboTCMS_WebWAN\JumboTCMS.UI\BasicPage.cs:行号 41rn 在 JumboTCMS.UI.FrontHtml.OnInit(EventArgs e) 位置 D:\Documents\Desktop\备份www.bhjb.so\JumboTCMS_V5.1.0\JumboTCMS_V5.1.0\JumboTCMS_WebWAN\JumboTCMS.UI\FrontHtml.cs:行号 26rn 在 System.Web.UI.Control.InitRecursive(Control namingContainer)rn 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rnrn我是连接的本地数据库 为什么还会这样的 请各位高手快帮帮小弟吧 快疯了
MYSQL导出数据库失败
mysqldump: Got error: 1449: The user specified as a definer ('sa'@'%') does not exist when using LOCK TABLES 解决方法:grant all privileges on *.* to sa@&quot;%&quot; identified by &quot;.&quot;; flush privileges
kettle连接oracle和mysql操作记录
kettle连接oracle和mysql操作记录 前提 将数据库的jar包驱动放到kettle的安装路径下:\data-integration\lib 按照此下方截图填入内容确定连接即可 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知...
【ETL】Kettle连接MySQL疑难问题及解决技巧
1. 指定驱动 一般来说,为了方便配置,在kettle中新建mysql连接时,都选择Native(JDBC)方法,这种方法虽然快捷,但是不能指定驱动类型,而且kettle默认使用的是org.gjt.mm.mysql.Driver,而mysql 8.0以上connector已经不再支持这个包名,所以,会出现明明已经将mysql-connector-java-8.0.xx.jar包拷贝到lib目录下,...
关于kettle连接不上mysql的问题
首次使用kettle,在连接mysql后测试一下出现一下错误,请求帮住解决,谢谢了!rnrn错误连接数据库 [jrd] : org.pentaho.di.core.exception.KettleDatabaseException: rnError occurred while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rnrnrnorg.pentaho.di.core.exception.KettleDatabaseException: rnError occurred while trying to connect to the databasernrnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rnrnrn at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)rn at org.pentaho.di.core.database.Database.connect(Database.java:370)rn at org.pentaho.di.core.database.Database.connect(Database.java:341)rn at org.pentaho.di.core.database.Database.connect(Database.java:331)rn at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)rn at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2795)rn at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:598)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)rn at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)rn at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)rn at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)rn at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:137)rn at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)rn at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)rn at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)rn at org.eclipse.jface.window.Window.open(Window.java:796)rn at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:80)rn at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:47)rn at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)rn at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)rn at org.pentaho.di.ui.trans.step.BaseStepDialog.showDbDialogUnlessCancelledOrValid(BaseStepDialog.java:779)rn at org.pentaho.di.ui.trans.step.BaseStepDialog$AddConnectionListener.widgetSelected(BaseStepDialog.java:1374)rn at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)rn at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)rn at org.pentaho.di.ui.trans.steps.tableinput.TableInputDialog.open(TableInputDialog.java:436)rn at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:127)rn at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8789)rn at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3179)rn at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:775)rn at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)rn at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)rn at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)rn at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1359)rn at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7990)rn at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9290)rn at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:685)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)rnCaused by: org.pentaho.di.core.exception.KettleDatabaseException: rnError connecting to database: (using class org.gjt.mm.mysql.Driver)rnCommunications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rnrn at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:585)rn at org.pentaho.di.core.database.Database.normalConnect(Database.java:456)rn ... 55 morernCaused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failurernrnThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)rn at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:981)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:339)rn at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)rn at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:795)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:567)rn ... 56 morernCaused by: java.net.ConnectException: Connection refused: connectrn at java.net.DualStackPlainSocketImpl.connect0(Native Method)rn at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)rn at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)rn at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)rn at java.net.AbstractPlainSocketImpl.connect(Unknown Source)rn at java.net.PlainSocketImpl.connect(Unknown Source)rn at java.net.SocksSocketImpl.connect(Unknown Source)rn at java.net.Socket.connect(Unknown Source)rn at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)rn at com.mysql.jdbc.MysqlIO.(MysqlIO.java:298)rn ... 71 morernrn主机名 : 127.0.0.1rn端口 : 3307rn数据库名:jrrnrn 我是通过SSH通道链接数据库的,之前是可以连接上的,过了一个周末回来后就莫名其妙不能连接了。rn 经过一番百度,说是需要把.jar包放到指定路径下,我也放了,还有说是mysql8小时的问题,我也重新设置并重启,结果还是一样,所以现在是真的不知道要怎么搞了,还请高手指教啊,在线等!rn kettle的版本是7.0.0.25,mysql的版本是5.7.17.0
QT——连接MySQL失败解决方案
qDebug()&amp;lt;&amp;lt;db.lastError().text(); //查看错误 QT工程里使用到了MYSQL数据库,然而运行时出现以下错误: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL...
php连接MySQL失败问题解决
因为计算机80端口被占用,所以配置php环境时,把端口号改为8088,所以在每次用浏览器预览php文件时,在localhost后面需要加上自定义端口号8088.鉴于是新手的原因。 在第一次连接使用数据库时,使用mysql_connect()函数,第一项地址名自作聪明的设置为 localhost:8088,结果显示一直连接不到数据库,网上查找了各类方法都无法解决,几天之后,偶然之下,只写local
hibernate连接mysql,自动建表失败
hibernate的列名使用了mysql的关键字
连接MySQL失败,错误代码10038
之前连接的好好的数据库,这几天突然就给罢工了。一直报“连接MySQL失败,错误代码10038”的错误,作为菜鸟,真心不知道该怎么办了。但是好在有“度娘”。 在此,自己也是总结一下顺便跟大家分享自己的解决方案: 总结:连接失败的这个错误在MySQL中也是很常见的小bug,究其原因,就是网络层不通造成的,而在网络层中,造成这个错误的最有可能的就是防火墙了
java连接MySQL失败!急救!!
import java.sql.*;rnrnpublic class TestJdbcrnrnpublic Connection con;rnrnpublic TestJdbc() rnrnrnrnrnpublic Connection connect()rnrnString url ="jdbc:mysql://localhost/sql_test";rnString user="root";rnString password="123456";rnrntryrnrnClass.forName("com.mysql.jdbc.Driver");rnrnrncatch(Exception ex)rnrnSystem.out.println(ex.getMessage());rnrnrntryrnrncon=DriverManager.getConnection(url,user,password);rnrnrncatch(Exception ex)rnrnSystem.out.println(ex.getMessage());rnrnreturn con;rnrnpublic static void main(String args[])rn TestJdbc tm=new TestJdbc();rn Connection m=tm.connect();rn if(m!=null)rn System.out.println("成功!");rn rnrn rn出现了如下的异常:rnMESSAGE: java.net.ConnectionException: Connection refused: connectrnSTACKTRACE:rnjava.net.SocketException:java.net.ConnectException: Connection refused: connectrnat com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)rnat com.mysql.jdbc.MyselIO.rn.......rn请问这是怎么回事,怎么解决呢,请帮帮我啊,小弟跪求了!!!rn
★★为什么我连接mysql失败?
初学jsp,想用jsp联mysql数据库,结果总是得到如下错误信息:rnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: org.gjt.mm.mysql.Driverrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)rnrn以下略...rn我已经在我的电脑->属性->...将环境变量CLASSPATH设置为rnE:\Study\JavaStudy;D:\JDK\lib\mysql-connector-java-3.0.9-stable-bin.jar;.rnrn并且已将mysql-connector-java-3.0.9-stable-bin.jar拷贝到了D:\jdk\lib下,为什么还是不行呢?rn请各位大侠帮忙看看,3ks!rnrn我的jsp测试文件代码如下:rn<%@ page contentType="text/html;charset=gb2312"%>rn<%@ page import="java.sql.*"%>rnrnrn<%rn Class.forName("org.gjt.mm.mysql.Driver").newInstance();rn String url ="jdbc:mysql://localhost/mydb?user=root&password=123&useUnicode=true&characterEncoding=8859_1";rn Connection conn= DriverManager.getConnection(url);rn Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);rn String sql="select * from student";rn ResultSet rs=stmt.executeQuery(sql);rn while(rs.next())rn rn%>rn 您的第一个字段内容为:<%=rs.getString(1)%>rn 您的第二个字段内容为:<%=rs.getString(2)%>rn<%rn rn%>rn<%rnout.print("数据库操作成功,恭喜你");rn%>rn<%rnrs.close();rnstmt.close();rnconn.close();rn%>rnrn
VS2005中连接MYSQL失败
操作系统是WINSERVER2003,安装了MYSQL5.0和MYSQL CONNECTOR/NET 5.1 ,在VS2005项目数据连接里选择‘新建连接’,选择‘MYSQL’,服务器名输入localhost,用户名 root,密码 123456 ,点击‘测试’却总是说无法和MYSQL取得连接,请问是什么原因?
使用JDBC连接MySQL失败
使用JDBC连接MySQL数据库时连接失败,并返回java.lang.NullPointerException异常,为什么会发生空指针异常?求大神指点~~rnrn <%rn String userName=rn new String(request.getParameter("userName").getBytes("ISO-8859-1"),"UTF-8");rn String password=rn new String(request.getParameter("password").getBytes("ISO-8859-1"),"UTF-8");rn Connection con=null;rn Statement st=null;rn ResultSet rs=null;rn if(userName.equals(""))rn rn response.sendRedirect("login.jsp");rn rn tryrn Class.forName("com.mysql.jdbc.Driver");rn String url="jdbc:mysql://localhost:3306/eims?useUnicode=true&characterEncoding=gbk";rn con=DriverManager.getConnection(url, "root", "6785098");rn st = con.createStatement();rn String query = "select * from user where userName = '" + userName + "'";rn rs = st.executeQuery(query);rn if (rs.next())rn rn String query2 = "select * from user where password = '" + password + "'";rn rs = st.executeQuery(query2);rn if (rs.next())rn rn response.sendRedirect("main/main.jsp");rn else rn response.sendRedirect("login.jsp");rn rn rn catch (Exception e) rn e.printStackTrace();rn finally rn rs.close();rn st.close();rn con.close();rn rn %>rn rn上述代码在调试的时候先进入try代码块,但是走到Class.forName("com.mysql.jdbc.Driver");这一行时驱动貌似没有加载,然后程序就直接跳过try块中的剩余代码,直接进入了catch代码块,再往后走到rs.close();时就发生空指针异常了,应该是rs为空导致的。初步判断是jdbc连接数据库部分代码没有执行,但是不知道为什么不执行?rn 这个项目名为EIMS,我在另一个项目(ch01)中用同样的jdbc代码连接MySQL是可以连接成功的,在mysql数据库中我是新建了两个连接,连接名分别对应这两个web项目名。请各位大神帮忙看下吧,不胜感激…
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数