Is there a way to view past mysql queries with phpmyadmin?

前端 未结 13 731
北恋
北恋 2020-12-24 04:32

I\'m trying to track down a bug that\'s deleting rows in a mysql table.

For the life of me I can\'t track it down in my PHP code, so I\'d

相关标签:
13条回答
  • 2020-12-24 04:38

    To view the past queries simply run this query in phpMyAdmin.

    SELECT * FROM `general_log`
    

    if it is not enabled, run the following two queries before running it.

    SET GLOBAL log_output = 'TABLE';
    SET GLOBAL general_log = 'ON';
    
    0 讨论(0)
  • 2020-12-24 04:39

    you can run your past mysql with run /PATH_PAST_MYSQL/bin/mysqld.exe

    it run your last mysql and you can see it in phpmyadmin and other section of your system.

    notice: stop your current mysql version.

    S F My English.

    0 讨论(0)
  • 2020-12-24 04:41

    Yes, you can log queries to a special phpMyAdmin DB table.

    See SQL_history.

    0 讨论(0)
  • 2020-12-24 04:51

    You just need to click on console at the bottom of the screen in phpMyAdmin and you will get the Executed history:

    0 讨论(0)
  • 2020-12-24 04:52

    I am using phpMyAdmin Server version: 5.1.41.

    It offers possibility for view sql history through phpmyadmin.pma_history table.

    You can search your query in this table.

    pma_history table has below structure:

    enter image description here

    0 讨论(0)
  • 2020-12-24 04:54

    Ok, so I actually stumbled across the answer.

    phpMyAdmin does offer a brief history. If you click on the 'sql' icon just underneath the 'phpMyAdmin' logo, it'll open a new window. In the new window, just click on the 'history' tab.

    That will give you the last twenty or so SQL operations.

    0 讨论(0)
提交回复
热议问题