67

Where can I find the MySQL's logs (errors, queries, etc.) in the phpMyAdmin interface?

simhumileco
  • 31,877
  • 16
  • 137
  • 115
citronic
  • 9,868
  • 14
  • 51
  • 74

6 Answers6

31

I had the same problem of @rutherford, today the new phpMyAdmin's 3.4.11.1 GUI is different, so I figure out it's better if someone improves the answers with updated info.

Full mysql logs can be found in:

"Status"->"Binary Log"

This is the answer, doesn't matter if you're using MAMP, XAMPP, LAMP, etc.

simhumileco
  • 31,877
  • 16
  • 137
  • 115
linuxatico
  • 1,878
  • 30
  • 43
28

Open your PHPMyAdmin, don't select any database and look for Binary Log tab . You can select different logs from a drop down list and press GO Button to view them.

Tasawer Khan
  • 5,994
  • 7
  • 46
  • 69
  • 20
    I have Databases,SQL,Status,Variables,Charsets,Engines,Processes,Export & Import tabs but no 'Binary Log' - am I looking in the correct location? – citronic Jun 14 '10 at 18:48
  • HUmm, I have Privileges and Binary log between Engines and Processes. are you using WAMP? Which version? Are you loged in with root? – Tasawer Khan Jun 14 '10 at 18:54
  • 1
    ah, probably restricted by my hosts then. I will ask them, thankyou for your help. – citronic Jun 14 '10 at 19:26
  • 9
    I can't find a `Binary Log tab` ! nor any tab related to logs ! – Muhammad Gelbana Sep 05 '12 at 11:30
  • 10
    @MuhammadGelbana, it's under the 'Status' tab. If you click on that and then look at the list items above 'Server Traffic' you'll see 'Binary Log' between 'Threads' and 'Temporary data'. – MillerMedia May 09 '13 at 22:03
20

I am using phpMyAdmin version 4.2.11. At the time of writing, my Status tab looks like this (a few options expanded; note "Current settings", bottom right):

Image of Status Panel

Note, there are no directly visible "features" that allow for the enabling of things such as slow_query_log. So, I went digging on the internet because UI-oriented answers will only be relevant to a particular release and, therefore, will quickly become out of date. So, what do you do if you don't see a relevant answer, above?

As this article explains, you can run a global query to enable or disable the slow_query_log et al. The queries for enabling and disabling these logs are not difficult, so don't be afraid of them, e.g.

SET GLOBAL slow_query_log = 'ON';

From here, phpMyAdmin is pretty helpful and a bit of Googling will get you up to speed in no time. For instance, after I ran the above query, I can go back to the "Instructions/Setup" option under the Status tab's Monitor window and see this (note the further instructions):

Slow query enabled

Thomas
  • 6,291
  • 6
  • 40
  • 69
  • 4
    This answer looked good as it was exactly my case. Unfortunately, it won't always work as you need SUPER privileges: "Error SQL query: SET GLOBAL slow_query_log = 'ON' #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation" – Alejandro Lozdziejski May 16 '19 at 20:13
18

In phpMyAdmin 4.0, you go to Status > Monitor. In there you can enable the slow query log and general log, see a live monitor, select a portion of the graph, see the related queries and analyse them.

Ooker
  • 1,969
  • 4
  • 28
  • 58
Marc Delisle
  • 8,879
  • 3
  • 29
  • 29
2

If you are using XAMPP as your server, you'll find a logs directory as a child of the XAMPP directory. If you have not tried XAMPP, which runs on any system (Windows, Mac OS & Linux) find more here: http://www.apachefriends.org/en/xampp.html

Benny Skogberg
  • 10,431
  • 11
  • 53
  • 83
0

Use performance_schema database and the tables:

  1. events_statements_current
  2. events_statemenets_history
  3. events_statemenets_history_long

Check the manual here

Labros kar
  • 41
  • 7