<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cat brain.log &#124; less &#187; cache</title>
	<atom:link href="http://log.largevoid.com/tag/cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.largevoid.com</link>
	<description>Getting it down on `paper`</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL DNS Caching</title>
		<link>http://log.largevoid.com/2008/12/mysql-dns-caching/</link>
		<comments>http://log.largevoid.com/2008/12/mysql-dns-caching/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 11:09:29 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[flush]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sccoos]]></category>

		<guid isPermaLink="false">http://log.largevoid.com/?p=25</guid>
		<description><![CDATA[On December 12, 2008, SCCOOS metadata system was broken. The error was cryptic, but the message was clear: Connection to [IP] denied. Resolution Using the MySQL command-line tool: mysql -u admin -p [-h ] [-P ] mysql> flush hosts; That&#8217;s it! Chain of Events UCSD&#8217;s DNS was polluted, identifying 132.239.123.144 as ridge2000.org for the past [...]]]></description>
			<content:encoded><![CDATA[<p>On December 12, 2008, <a href="http://www.sccoos.org/meta/">SCCOOS metadata system</a> was broken.  The error was cryptic, but the message was clear: Connection to [IP] denied.</p>
<h3>Resolution</h3>
<p>Using the MySQL command-line tool:<br />
<code><br />
mysql -u admin -p [-h <hostname>] [-P
<port>]<br />
mysql> flush hosts;<br />
</code></p>
<p>That&#8217;s it!</p>
<h3>Chain of Events</h3>
<ul>
<li>UCSD&#8217;s DNS was polluted, identifying 132.239.123.144 as ridge2000.org for the past few weeks.</li>
<li>Sandbar was restarted last week, freeing up both the OS and MySQL DNS caches, which meant all new connections will need to query a DNS server to identify whether it&#8217;s an allowed machine or not (do you see a security vulnerability?).</li>
<li>Both the OS and MySQL cached the hostname, but MySQL further rejected all connections from alfredo because MySQL thought that alfredo was ridge2000 instead.</li>
<li>The <em>mysql</em> database, <em>user</em> table identifies user <em>sccoos</em> can connect to sandbar from <em>alfredo.ucsd.edu</em>.</li>
<li>The OS cache probably cleared, but since so few machines access sandbar, the MySQL cache hadn&#8217;t filled up yet.</li>
<li>Just last night (2008-12-22), the UCSD DNS purged the ridge2000.org name from its list, so UCSD&#8217;s DNS is clean, but any caches may still be polluted.</li>
</ul>
<ul>
<li>Windows machines cycle their caches regularly, so the problem isn&#8217;t more wide-spread or commonly understood.</li>
<li>The long-lasting MySQL DNS cache is disturbing, but alternatives would cripple the imperative nature of a database.</li>
</ul>
<h3>References</h3>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/dns.html">MySQL DNS Reference</a></li>
<li><a href="http://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://log.largevoid.com/2008/12/mysql-dns-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  log.largevoid.com/tag/cache/feed/ ) in 0.20415 seconds, on Feb 8th, 2012 at 4:19 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 5:19 am UTC -->
