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.