简体   繁体   English

将talnd连接到MySQL [转换只读状态服务器]

[英]Connecting talnd to MySQL [transation read-only status server]

I am trying to connect Talend (version 7.0.1) to MySQL Server (version 8.0.12), I can successfully connect and perform simple select queries to the database. 我正在尝试将Talend(7.0.1版)连接到MySQL Server(8.0.12版),我可以成功连接数据库并对其执行简单的选择查询。 However as soon as I try to perform a bulk Insert I get the following exception: 但是,一旦我尝试执行批量插入,就会出现以下异常:

Starting job A_2_ProcessRestData_NEW at 17:59 20/08/2018.

[statistics] connecting to socket on port 3407
[statistics] connected
Exception in component tDBOutputBulkExec_1_tMBE (A_2_ProcessRestData_NEW)
java.sql.SQLException: Could not retrieve transation read-only status server
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:949)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)
    at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3976)
    at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3947)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:813)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:788)
    at living_dashboard.a_2_processrestdata_new_0_1.A_2_ProcessRestData_NEW.tFileInputDelimited_1Process(A_2_ProcessRestData_NEW.java:4671)
    at living_dashboard.a_2_processrestdata_new_0_1.A_2_ProcessRestData_NEW.runJobInTOS(A_2_ProcessRestData_NEW.java:6955)
    at living_dashboard.a_2_processrestdata_new_0_1.A_2_ProcessRestData_NEW.main(A_2_ProcessRestData_NEW.java:6733)
Caused by: java.sql.SQLException: Unknown system variable 'tx_read_only'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2781)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1569)
    at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3970)
    ... 6 more
[statistics] disconnected

Job A_2_ProcessRestData_NEW ended at 17:59 20/08/2018. [exit code=1]

Do you have any clue on what might be? 您有什么可能的线索吗?

Thanks in advance 提前致谢

I eventually solved the question. 我终于解决了这个问题。 It turns out that the DB Version to be used cannot be MySQL 5 as I was specifying. 事实证明, 要使用数据库版本不能是我指定的MySQL 5 I need to use MariaDB instead. 我需要改用MariaDB Problem solved ;) 问题解决了 ;)

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

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