What is equivalent statement of DBCC INPUTBUFFER(@@SPID)(which give sql statement for current connection otr specified connection) in MYSQL?
What is the MySQL equivalent statement of DBCC INPUTBUFFER(@@SPID)
, which lists the sql statement for current connection 开发者_如何转开发or specified connection?
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.
精彩评论