Issue 1:
Which version of ShardingSphere did you use?

tag 4.1.1

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

sharding-proxy

Expected behavior

The proxy server can start normally.

Actual behavior

The proxy server cannot start.

Reason analyze (If you can)

The password field of YamlDataSourceParameter is of type String. But when the password chars in setting are all number, the type of password in DataSourceConfiguration.properties is Integer.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Config

.../config/schema/master_slave_db/datasource

master_ds: !!org.apache.shardingsphere.orchestration.core.configuration.YamlDataSourceConfiguration

dataSourceClassName: com.zaxxer.hikari.HikariDataSource

properties:

url: jdbc:mysql://127.0.0.1:3306/proxy?serverTimezone=UTC&useSSL=false

username: proxy

password: 123456

connectionTimeoutMilliseconds: 30000

idleTimeoutMilliseconds: 60000

maxLifetimeMilliseconds: 1800000

maxPoolSize: 50

then start the proxy server.

Example codes for reproduce this issue (such as a github link).

Issue 2:
Bug Report

Which version of ShardingSphere did you use?

Sharding-Proxy 5.1.2

Actual behavior

error log:

[ERROR] 2022-07-18 07:03:02.002 [nioEventLoopGroup-3-3] o.a.s.p.f.n.FrontendChan
nelInboundHandler - Exception occur:
java.lang.IndexOutOfBoundsException: readerIndex(1) + length(4) exceeds writerIn
dex(4): PooledSlicedByteBuf(ridx: 1, widx: 4, cap: 4/4, unwrapped: PooledUnsafeD
irectByteBuf(ridx: 7, widx: 47, cap: 2048))
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.j
ava:1442)
at io.netty.buffer.AbstractByteBuf.readIntLE(AbstractByteBuf.java:817)
at org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayloa
d.readInt4(MySQLPacketPayload.java:115)
at org.apache.shardingsphere.db.protocol.mysql.packet.handshake.MySQLHan
dshakeResponse41Packet.<init>(MySQLHandshakeResponse41Packet.java:56)
at org.apache.shardingsphere.proxy.frontend.mysql.authentication.MySQLAu
thenticationEngine.authPhaseFastPath(MySQLAuthenticationEngine.java:88)
at org.apache.shardingsphere.proxy.frontend.mysql.authentication.MySQLAu
thenticationEngine.authenticate(MySQLAuthenticationEngine.java:75)
at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInbound
Handler.authenticate(FrontendChannelInboundHandler.java:83)
at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInbound
Handler.channelRead(FrontendChannelInboundHandler.java:75)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:357)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMes
sageDecoder.java:327)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMes
sageDecoder.java:314)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageD
ecoder.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessage
Decoder.java:279)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCo
dec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(Defau
ltChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChanne
lPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Abstra
ctNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.jav
a:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEve
ntLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.ja
va:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThread
EventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java
:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalR
unnable.java:30)
at java.lang.Thread.run(Thread.java:748)

Reason analyze (If you can)

The command line window of sharding proxy reported this error at 7 a.m., but I can see in the main application log that no HTTP interface has been called at this time.