0

How to select the last executed queries in MySQL?

Victor
  • 8,309
  • 14
  • 80
  • 129

2 Answers2

0

You can enable the General Query Log.

Edit: Duplicate question. Answer here.

Community
  • 1
  • 1
Bradford
  • 4,143
  • 2
  • 34
  • 44
0

If the general query log is enabled, then you can use tail to see the most recent queries executed on your server.

If the general query log is disabled, there is no way to do this.

If the binary log is enabled you can see the most recent insert/update/delete queries in there, but not selects.

Ike Walker
  • 64,401
  • 14
  • 110
  • 109