开发者

MySQL - How to find which sql query is being executed

开发者 https://www.devze.com 2022-12-14 04:40 出处:网络
How can i find which query is being 开发者_高级运维executed in mysql. Example : I have a java application which makes several calls to the database, i want to track the queries executed by this applic

How can i find which query is being 开发者_高级运维executed in mysql. Example : I have a java application which makes several calls to the database, i want to track the queries executed by this application from the sql side.

Thanks Micheal


Use:

show processlist;

...to show you the running queries on your MySQL server. For more info: Showing running queries in MySQL

show full processlist 

...will show the complete query of all connected clients.


show processlist will tell you what each thread is doing on MySQL server.

0

精彩评论

暂无评论...
验证码 换一张
取 消