JStef
JStef

Reputation: 176

How to create a MySQL log using Java

I am currently using MySQL Workbench which already contains a logging mechanism. The problem is, is that the log only logs queries executed within the Workbench.
Any connections made by JDBC isn't actually logged. How do I create a log that incorporates the Java queries into SQL?

I am using Workbench 6.3, SQL version 5.6.31

Upvotes: 0

Views: 183

Answers (1)

Kedar Mhaswade
Kedar Mhaswade

Reputation: 4695

I believe you need the server side logging. If that's correct, see How to enable MySQL Query Log?.

This, of course, logs all the SQL queries received by the MySQL server (all connections), which means you should use it judiciously.

Upvotes: 1

Related Questions