在kettle安装目录下有脚本encr.sh 或者 Encr.bat (Windows),运行命令 ./encr.sh -kettle Password_123
$ ./encr.sh -kettle Password_123Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0Listening for transport dt_socket at address: 1044SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/Users/twx/Downloads/data-integration/launcher/../lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/Users/twx/Downloads/data-integration/launcher/../lib/phoenix-client-4.7.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]log4j:WARN Continuable parsing error 45 and column 76log4j:WARN Element type "rollingPolicy" must be declared.log4j:WARN Continuable parsing error 52 and column 14log4j:WARN The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)".log4j:WARN Please set a rolling policy for the RollingFileAppender named 'pdi-execution-appender'20:26:46,156 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled20:26:46,250 INFO [KarafInstance]********************************************************************************** Karaf Instance Number: 1 at /Users/twx/Downloads/data-integration/./sys ****** tem/karaf/caches/encr/data-1 ****** FastBin Provider Port:52901 ****** Karaf Port:8802 ****** OSGI Service Port:9051 **********************************************************************************九月 27, 2019 8:26:46 下午 org.apache.karaf.main.Main launch信息: Installing and starting initial bundles九月 27, 2019 8:26:47 下午 org.apache.karaf.main.Main launch信息: All initial bundles installed and set to start九月 27, 2019 8:26:47 下午 org.apache.karaf.main.Main$KarafLockCallback lockAquired信息: Lock acquired. Setting startlevel to 100Encrypted 2be98afc83ac68197bc16bc74e1c3fd89
然后就可以将密码粘贴复制到xml文件中了,或者在kettle.properties 里配置
SY.MYSQL.PASSWORD= Encrypted 2be98afc83ac68197bc16bc74e1c3fd89
对应的xml中的密码应该是:

