Jmeter JDBC请求 Jmeter JDBC请求常见问题解决方案

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

Jmeter JDBC请求 Jmeter JDBC请求常见问题解决方案

板栗+   2021-04-22 我要评论

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

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

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

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

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

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

在配置中添加?zeroDateTimeBehavior=CONVERT_TO_NULL

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们