1:打开profiling
SET profiling = 1;
2:查看最近执行的SQL
show profiles;
3:通过第2步SQL执行记录,查看具体SQL
show profile all for query 2;