When using jemter to connect to the database, it reported Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.). Looking through various materials, it was finally resolved.
Solution: Change the database URL in the picture to jdbc:mysql://127.0.0.1 (or localhost):3306/test,
because the database with root privileges can only be accessed through localhost, of course, you can also use docker in the virtual machine Start mysql, so you can use the ip address to access it, pay attention to put the JDBC jar package in the lib/ext under the jmeter directory.
This is a perfect solution
Mengxin blogs for the first time, hoping to help everyone, learn and grow together! ! !