前提是配置了MySQL的慢日志相关配置

使用mysql -u root -p命令连接之后查看慢sql

select * from mysql.slow_log order by 1;