首页 > 数据库技术 > 详细

如何在mysql命令窗口获取到程序正在执行的sql语句

时间:2016-03-17 12:37:09      阅读:285      评论:0      收藏:0      [点我收藏+]

步骤:

1.进入mysql的命令窗口;

2.运行use information_schema;

3.运行select * from PROCESSLIST where info is not null;(注:需要在程序执行某一操作的同时执行该语句

4.命令窗口会列出当前mysql所有线程的相关信息,包含mysql正在执行的语句(在INFO一栏)。

mysql> use information_schema;

mysql> select * from PROCESSLIST where info is not null;

技术分享

如何在mysql命令窗口获取到程序正在执行的sql语句

原文:http://www.cnblogs.com/luoyuce/p/getMysqlRunningStatements.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!