1、 时区设置问题

Cannot create PoolableConnectionFactory (The server time zone value '???��������??��??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.)

解决方案:时区的问题,设置成全球标准时间。修改JDBC Connection Configuration配置中的Database URL,在其末尾加上?serverTimezone=UTC

jmeter之JDBC请求遇到的问题

 

 

2、Jmeter中使用JDBC向数据库插入中文数据乱码问题

解决方案:修改了JDBC的配置,在Database URL中增加了编码格式,具体为:jdbc:mysql://<server ip>:3306/student?characterEncoding=UTF-8

 

3、多行查询语句

修改JDBC的配置,在Database URL中增加允许多行,具体为:jdbc:mysql://<server ip>:3306/student ?allowMultiQueries=true

 

 jmeter之JDBC请求遇到的问题

 然后在jdbc request中的query type 的下拉框中选择callable statement

jmeter之JDBC请求遇到的问题

 

 

  

4、请求数据中的中文显示乱码

是因为插入数据的字符串格式的数据没有加引号,如图

 jmeter之JDBC请求遇到的问题

 

 

 jmeter之JDBC请求遇到的问题

 

 在SQL语句中给对应的字符串添加引号

jmeter之JDBC请求遇到的问题

 

 

5、执行jdbc请求时,报错:Zero data value prohioited

在配置中添加?zeroDateTimeBehavior=CONVERT_TO_NULL

如果是下图中的报错,则设置为 ?zeroDateTimeBehavior=convertToNull

jmeter之JDBC请求遇到的问题

 

相关文章:

  • 2021-12-20
  • 2021-08-17
  • 2021-07-03
  • 2021-07-28
  • 2022-12-23
  • 2021-11-23
  • 2021-08-09
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2021-08-21
  • 2021-11-04
  • 2020-04-21
  • 2021-12-29
  • 2021-10-16
相关资源
相似解决方案