8

I'm trying to enable and see logs in mysql workbench.

In my my-default.ini file added log=filename.log.

Saved--->services stopped and started

Now where I can or how can see the actions performed on table in log of mysql ?

roy
  • 101
  • 1
  • 3
  • 9
  • Execute this command SHOW VARIABLES LIKE "%log%" which will show you all the log files path for the server. I think you are looking for General Query log? – Sathish D Jan 06 '16 at 07:34
  • @SathishD, Yes something like that. If accidentally some records get deleted from Table A, then how I'd be able to check the logs for that specific table ? – roy Jan 06 '16 at 08:02
  • You will have those in General query log. – Sathish D Jan 06 '16 at 09:20

3 Answers3

5

The following image explains what to do. Switch to the admin section and click on the Server Logs entry. enter image description here

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
  • 5
    location of MYSQL configuration file (i.e my.cnf) not specified (Error). How can I fix this ? – roy Jan 06 '16 at 09:29
  • This is a different question. Difficult to answer in a comment, since I cannot add a screenshot. Look in the connection setting under "System Profile". Note: on some platforms the default installation of a MySQL server does not have a config file and uses default values (e.g. on OSX). – Mike Lischke Jan 06 '16 at 09:31
  • Could you help me for what to write in my-default.ini file so that I could check logs ? And in describe variables do I need to set path to general_log of my-default.ini ? – roy Jan 06 '16 at 09:37
  • Open a new question at SO instead of hijacking an existing one. – Mike Lischke Jan 06 '16 at 09:38
  • but all these comments goes to this question only !! – roy Jan 06 '16 at 09:39
  • This question is about the server logs, not the config file and I'm sure there are already questions about how to configure a server using WB on OSX. Just search a bit. – Mike Lischke Jan 06 '16 at 09:51
  • Searching from last couple of hours, but nothing lit up my problem – roy Jan 06 '16 at 09:58
  • This might help: https://stackoverflow.com/questions/39822702/location-of-mysql-configuration-file-ie-my-cnf-not-specified/42277475 – Mageswaran May 08 '21 at 13:42
0

The below tells the location and for more info visit https://dev.mysql.com/doc/workbench/en/wb-configuring-files.html For the client side logs

Rajesh Goel
  • 3,277
  • 1
  • 17
  • 13
0

I had to edit the actual xml config file:

...\AppData\Roaming\MySQL\Workbench\server_instances.xml

changed from:

<value type="string" key="logOutput">NONE</value>

to:

<value type="string" key="logOutput">FILE</value>

I can now see the logs.

developer68
  • 73
  • 1
  • 7