What is equivalent statement of DBCC INPUTBUFFER(@@SPID)(which give sql statement for current connection otr specified connection) in MYSQL?

前端 未结 1 1777
心在旅途
心在旅途 2021-01-22 20:18

What is the MySQL equivalent statement of DBCC INPUTBUFFER(@@SPID), which lists the sql statement for current connection or specified connection?

相关标签:
1条回答
  • 2021-01-22 21:17

    Use SHOW PROFILES to see a list of the most recent statements sent to MySQL:

    SHOW PROFILES;
    

    If you want/need to see currently running queries, use SHOW PROCESSLIST:

    SHOW FULL PROCESSLIST;
    

    The FULL keyword means the list will include queries from all clients, not just the one you are running the command on.

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