Reputation: 14466
Is there a tool that anyone knows that clearly shows something like this:
Opened Connection
- Qry 1 executed... xyz time
- Qry 2 executed... abc time
Connection Closed
Connections are from PHP to MySQL.
Does any profiler help?
Upvotes: 1
Views: 1158
Reputation: 3759
yes, show processlist
mysql> show processlist;
+----+----------+-----------+--------+---------+------+------------+-------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+----------+-----------+--------+---------+------+------------+-------------------------------+
| 5 | jbolivar | localhost | SOF | Query | 0 | NULL | show processlist |
| 6 | jbolivar | localhost | sakila | Query | 2 | User sleep | select *,sleep(20) from actor |
+----+----------+-----------+--------+---------+------+------------+-------------------------------+
2 rows in set (0.00 sec)
and if you want to kill the process you can use, kill query $ID
mysql> kill query 6;
Query OK, 0 rows affected (0.00 sec)
EDIT:
If you need a tool, take a look to mtop
Upvotes: 3
Reputation: 141013
You can use external tool like Sql profiler for this kind of task. I already have used Jet Sql Profiler (http://www.jetprofiler.com) but it's a commercial solution. I haven't found anything similar to Sql Server Profiler free for MySql yet.
Upvotes: 0