1

How can we only log the complete list of insert and update queries executed in mysql

Rakhitha Nimesh
  • 1,393
  • 2
  • 16
  • 26

1 Answers1

0

Start mysql with the --log option:

mysqld --log=log_file_name or place the following in your my.cnf file:

log = log_file_name Either one will log all queries to log_file_name.

You can also log only slow queries using the --log-slow-queries option instead of --log. By default, queries that take 10 seconds or longer are considered slow, you can change this by setting long_query_time to the number of seconds a query must take to execute before being logged.

kiran gadhe
  • 733
  • 3
  • 11