Where can I find MySQL logs in phpMyAdmin?

前端 未结 6 1239
南笙
南笙 2020-12-13 05:59

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

6条回答
  •  猫巷女王i
    2020-12-13 06:17

    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

提交回复
热议问题