当前位置:网站首页>Get data from the database when using JMeter for database assertion

Get data from the database when using JMeter for database assertion

2022-07-05 12:13:00 tj9856

In use today Jemter To debug JDBC When asked , First, I encountered the following error message :“Host ‘LAPTOP-5LRDE9DJ’ is not allowed to connect to this MySQL server”;
 Insert picture description here
After Baidu, it is because MYSQL No permission to open remote login , So use Jmeter Can't connect MYSQL;
because MYSQL The service is deployed directly on my computer , All I use directly Navicate Login modified root Account permissions ;
take root Account number Host Change it to %, Account number exists mysql Under the user In the table
 Insert picture description here
Then call JDBC Interface , The following error message is reported :Response message:java.sql.SQLException: Cannot create PoolableConnectionFactory (Unknown initial character set index ‘255’ received from server. Initial client character set can be forced via the ‘characterEncoding’ property.)
 Insert picture description here
Baidu found that it was because the code did not match , I don't know because I used jar Bag and mysql The version of does not match or what problem , There is URL The following conditions are added to solve , Successfully obtained the data
?useUnicode=true&characterEncoding=utf8
 Insert picture description here

原网站

版权声明
本文为[tj9856]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140531534920.html