如何在php中显示正在运行的mysql查询 [英] How to show running mysql queries in php
本文介绍了如何在php中显示正在运行的mysql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个内存溢出问题,需要扫描所有脚本.
I have an overflow memory usage problem and I need to scan all my scripts.
我的问题是如何显示PHP中正在运行的mysql查询的列表?
My question is how can I show a list of running mysql queries in php?
推荐答案
如果问题出在MySQL网站上,则可能会有所帮助:
If the problem is on MySQL site this could help a lot:
mysql_query('show processlist');
它应该返回所有等待处理的查询.我通常直接从mysql控制台直接使用它,而不必格式化输出.
It should return all queries waiting for processing. I usually use it directly from mysql console where I don't have to format the output.
这篇关于如何在php中显示正在运行的mysql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文