<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to track what owns a MySQL connection</title>
	<atom:link href="http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Fri, 12 Mar 2010 01:22:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: binzhang</title>
		<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-15804</link>
		<dc:creator>binzhang</dc:creator>
		<pubDate>Tue, 10 Feb 2009 08:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=188#comment-15804</guid>
		<description>looks like thread id in &quot;prstat -L -p $mysqld_pid &quot; is the  select connection_id()+10.

thread 1-10 are internal thread and not in show processlist.</description>
		<content:encoded><![CDATA[<p>looks like thread id in &#8220;prstat -L -p $mysqld_pid &#8221; is the  select connection_id()+10.</p>
<p>thread 1-10 are internal thread and not in show processlist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: innotop 1.5.0 released at Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-13388</link>
		<dc:creator>innotop 1.5.0 released at Xaprb</dc:creator>
		<pubDate>Mon, 10 Sep 2007 21:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=188#comment-13388</guid>
		<description>[...] 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 [...]</description>
		<content:encoded><![CDATA[<p>[...] 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 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitriy</title>
		<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-11568</link>
		<dc:creator>Dmitriy</dc:creator>
		<pubDate>Wed, 13 Jun 2007 23:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=188#comment-11568</guid>
		<description>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</description>
		<content:encoded><![CDATA[<p>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. </p>
<p>For details, see <a href="http://www.softtreetech.com/idbaudit.htm" rel="nofollow">http://www.softtreetech.com/idbaudit.htm</a></p>
<p>For more details contact SoftTree Technologies</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobin Harris</title>
		<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-1972</link>
		<dc:creator>Tobin Harris</dc:creator>
		<pubDate>Mon, 25 Sep 2006 13:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=188#comment-1972</guid>
		<description>&lt;p&gt;Nice idea that, totally understand why you needs this. &lt;/p&gt;

&lt;p&gt;Another approach is to have a different user for each &quot;application&quot; that connects. It isn&#039;t quite as good since you can&#039;t see what process opened the connection, but it does mean you can monitor which applications are doing what if you know that application A corresponds to a certain user. I used it to see which applications aren&#039;t releasing connections. &lt;/p&gt;

&lt;p&gt;Something that might help solve all problems would be the ability to pass a token in when opening a connection. Such as this&lt;/p&gt;

&lt;pre&gt;conStr = &quot;blah=blah;token=&quot; + this.Process.Id;
con = new MySqlConnection(con);&lt;/pre&gt;

&lt;p&gt;Then, you could see in MySQL process list the token associated with the connection. This would help me greatly as then you could even indicate in the token which function/subroutine the connection was opened from if tha twas the level of granularity required. &lt;/p&gt;

&lt;p&gt;Tobin&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Nice idea that, totally understand why you needs this. </p>
<p>Another approach is to have a different user for each &#8220;application&#8221; that connects. It isn&#8217;t quite as good since you can&#8217;t see what process opened the connection, but it does mean you can monitor which applications are doing what if you know that application A corresponds to a certain user. I used it to see which applications aren&#8217;t releasing connections. </p>
<p>Something that might help solve all problems would be the ability to pass a token in when opening a connection. Such as this</p>
<pre>conStr = "blah=blah;token=" + this.Process.Id;
con = new MySqlConnection(con);</pre>
<p>Then, you could see in MySQL process list the token associated with the connection. This would help me greatly as then you could even indicate in the token which function/subroutine the connection was opened from if tha twas the level of granularity required. </p>
<p>Tobin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/07/23/how-to-track-what-owns-a-mysql-connection/#comment-1810</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Thu, 14 Sep 2006 17:35:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=188#comment-1810</guid>
		<description>&lt;p&gt;Yes, I know, and I&#039;ve known that for years :-)  But what is the UNIX process ID of the program that made the connection?&lt;/p&gt;

&lt;p&gt;This article isn&#039;t about knowing what your connection ID is, or what your connection is doing.  This article is about being a DBA and seeing a connection that is doing something ridiculous, or hung, or just staying open for three days.  You don&#039;t want to just kill the connection.  You want to find the code that made the connection, and fix it.  OK, you can easily find out the connection ID (in fact, by definition, you should already know that information before any of the rest of my article is of any use to you), and the machine where the connection was made.  But can you find out the program on that machine that made the connection?  Let&#039;s pretend you can (probably impossible for most of you).  And if it&#039;s &quot;/usr/sbin/apache2,&quot; what then?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The connection is not the source of the trouble.  Knowing the connection ID is trivial, and doesn&#039;t get you anywhere.  The program that made the connection is the problem, and that is what you need to find out.&lt;/strong&gt;  That is the point of this article.  The further point of this article is that &lt;strong&gt;you cannot find this information from within MySQL&lt;/strong&gt;.  You have to do some sort of technique such as the ones I suggest here.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Yes, I know, and I&#8217;ve known that for years :-)  But what is the UNIX process ID of the program that made the connection?</p>
<p>This article isn&#8217;t about knowing what your connection ID is, or what your connection is doing.  This article is about being a DBA and seeing a connection that is doing something ridiculous, or hung, or just staying open for three days.  You don&#8217;t want to just kill the connection.  You want to find the code that made the connection, and fix it.  OK, you can easily find out the connection ID (in fact, by definition, you should already know that information before any of the rest of my article is of any use to you), and the machine where the connection was made.  But can you find out the program on that machine that made the connection?  Let&#8217;s pretend you can (probably impossible for most of you).  And if it&#8217;s &#8220;/usr/sbin/apache2,&#8221; what then?</p>
<p><strong>The connection is not the source of the trouble.  Knowing the connection ID is trivial, and doesn&#8217;t get you anywhere.  The program that made the connection is the problem, and that is what you need to find out.</strong>  That is the point of this article.  The further point of this article is that <strong>you cannot find this information from within MySQL</strong>.  You have to do some sort of technique such as the ones I suggest here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
