zoukankan      html  css  js  c++  java
  • Jmeter数据库连接报错-Could not create connection to database server

    最近在整jmeter压测数据库,但是连接到本地数据库时一直连接不上;

    jmeter中报错信息是 Cannot create PoolableConnectionFactory (Could not create connection to database server.)

    查询了网络上的资料,很多人说是因为jar版本过低,我的Mysql是8.0.18的版本,jar是5.0.17的版本,确实是比较低;

    更换新版本jar包之后还是报错,jmeter中的报错信息一直没变,就去jmeter的运行窗口看了一下,发现报错如下:

     Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

    翻译:建议在没有服务器身份验证的情况下建立SSL连接,根据MySQL 5.5.45+、5.6.26+和5.7.6+的要求,如果没有设置显式选项,则必须默认建立SSL连接。为了符合不使用SSL的现有应用程序,verifyServerCertificate属性被设置为“false”。您需要通过设置useSSL=false显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。

    根据提示,在jmeter的JDBC Connection Configure配置中的Database Connection Configuration --> Database URL中的Url后面加上  '?useSSL=false'即可。

    示例 : jdbc:mysql://127.0.0.1:3306/test?useSSL=false

    如果有其他参数可以在问号后面使用&符号拼接,示例 : jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false   

    注意: 我加上 useSSL=false 这个后缀后jmeter中不知道为什么还是会报错,但是jmeter的运行窗口不再显示报错信息,后来重启了一下jmeter,问题解决!

  • 相关阅读:
    hdoj-1005-Number Sequences
    FOJ-1058-粗心的物理学家
    程序设计第三次作业附加 代码规范
    简单数论
    FOJ-1001-Duplicate Pair
    链表初尝试-链表的构建与输出-指针
    函数递归简单题-hdoj-2044 2018-一只小蜜蜂 母牛的故事
    电路与电子学-第一章直流电路分析方法小概括
    DFS回溯-函数递归-xiaoz triangles
    进制转换 hdoj-2031
  • 原文地址:https://www.cnblogs.com/wuaihua/p/12935662.html
Copyright © 2011-2022 走看看