'Client name field is missing in the pcap - connection by DriverManager to MariaDB
Writing with Java, I am using JDBC DriverManager Interface to connect MariaDB:
connectionUrl = jdbc:mysql://10.100.92.141:3306/mysql
sqlConnection = DriverManager.getConnection(connectionUrl, dbUser, dbPassword);
After the connection is established, I send some queries and the traffic is recorded to a pcap.
While opening the pcap, the field of "client_name" that should be: "MariaDB Connector/J" is missing.
How can I make the connection send also the client name field?
I added a screenshot of comparing two pcaps:
On the left: traffic that I sent manually to DB via DBeaver, there I can see connection attributes and there is the client name.
On the right: traffic that sent via Java code, there are no connection attributes:
Solution 1:[1]
the solution:
replace mysql driver with this driver: "mariadb-java-client-3.0.3.jar driver"
driverClassName: "org.mariadb.jdbc.Driver",
dbConnectionUrl: "jdbc:mariadb://${host}:${port}/${dbName}"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Orly Orly |
