rkey

rkey

kettle connects to mysql 8.0.19

The connection method for mysql8 is different, so it's separated out.

https://blog.csdn.net/qq_42891999/article/details/104880596

  1. Download the mysql8.0 jar driver.

https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.19

image

  1. Place the downloaded mysql driver into the lib folder of the kettle installation files, then restart Spoon.

  2. Two ways to connect.

The first method:

Select Generic Database for the database type.

Fill in the custom connection URL:

jdbc:mysql://localhost:3306/sys?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL

(Note:

Replace localhost with your database address.

Replace 3306 with your database port number.

sys is your database name.)

Fill in the custom driver class name: com.mysql.cj.jdbc.Driver

Just enter the username and password.

DescriptionParameter
DialectGeneric Database
Custom Connection URLjdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL
Custom Driver Class Namecom.mysql.cj.jdbc.Driver
UsernameDatabase user
PasswordDatabase password

Important parameters for the custom connection URL

(https://www.cnblogs.com/itzyz/p/12153875.html)

jdbcConnection method
mysqlDatabase
localhostDatabase address (IP address of the server where the database is located)
testDatabase name (for example, there is a database named test in the mysql database, which contains many tables.)
useUnicodeWhether to use Unicode character set; if the characterEncoding parameter is set to gb2312 or gbk, this parameter must be set to true
characterEncodingWhen useUnicode is set to true, specify the character encoding. For example, it can be set to gb2312 or gbk
autoReconnectWhether to automatically reconnect when the database connection is interrupted?
autoReconnectForPoolsWhether to use a reconnection strategy for database connection pools
failOverReadOnlyAfter a successful automatic reconnection, should the connection be set to read-only?
maxReconnectsNumber of retries for connecting when autoReconnect is set to true
initialTimeoutTime interval between two reconnections when autoReconnect is set to true, in seconds
connectTimeoutTimeout for establishing a socket connection with the database server, in milliseconds. 0 means never timeout, suitable for JDK 1.4 and higher versions
socketTimeoutSocket operation (read/write) timeout, in milliseconds. 0 means never timeout

If you switch to another version of the database, please download the corresponding database connection jar package and place it in the lib folder of the kettle installation folder, then restart kettle.

(Kettle is an application that can be used once extracted, as long as there is a suitable JDK environment.)

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.