Comments on: How to track what owns a MySQL connection http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/ Stay curious! Thu, 02 May 2013 12:36:53 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: faja http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-19606 faja Fri, 02 Sep 2011 16:27:50 +0000 http://www.xaprb.com/blog/?p=188#comment-19606 Hi there, i know that this articule was written in 2006, but..

mysql> show full processlist;
from ‘Host’ column you can read _host_ and _PORT_

log into that _host_ and:
# netstat -pt state connected |grep _PORT_
and you have program name and pid

greetings

]]>
By: Another Approach http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-18589 Another Approach Thu, 26 Aug 2010 22:37:20 +0000 http://www.xaprb.com/blog/?p=188#comment-18589 A lot of applications are generally responsible and close the connection properly. I’m more interested in slow queries that bog down the database across HTTP (Apache). We also use a common database layer. An alternate approach is to simply track the HTTP requests that take a long time and, specifically, the one SQL query that hung up the page. We use PHP, so we can also dump a call stack and put serialize()’d request data into the database. If the user has already waited more than 5 seconds for a response, what is an extra 20ms? To do this, modify the database layer to make one extra SQL query to a “long queries” table that contains all the information you think you will need to diagnose issues.

]]>
By: binzhang http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-15804 binzhang Tue, 10 Feb 2009 08:31:59 +0000 http://www.xaprb.com/blog/?p=188#comment-15804 looks like thread id in “prstat -L -p $mysqld_pid ” is the select connection_id()+10.

thread 1-10 are internal thread and not in show processlist.

]]>
By: innotop 1.5.0 released at Xaprb http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-13388 innotop 1.5.0 released at Xaprb Mon, 10 Sep 2007 21:59:06 +0000 http://www.xaprb.com/blog/?p=188#comment-13388 [...] and InnoDB Transaction List modes. These show the originating program and PID for connections by querying tables in which this data is stored. The plugin adds the columns and expressions for them, and then adds the data in by using [...]

]]>
By: Dmitriy http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-11568 Dmitriy Wed, 13 Jun 2007 23:23:02 +0000 http://www.xaprb.com/blog/?p=188#comment-11568 SoftTree Technologies now provides full MySQL auditing including both network based and local access as part of the DB Audit solution. The solution comes with graphical tools for setting up the auditing and for monitoring and reporting on database access and user activities within MySQL databases; and also includes a back-end API that allows hooking the auditing into third-party applications.

For details, see http://www.softtreetech.com/idbaudit.htm

For more details contact SoftTree Technologies

]]>