<?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>TD Moose &#187; database</title>
	<atom:link href="http://www.tdmoose.com/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tdmoose.com</link>
	<description>All things moose, and, then some.</description>
	<lastBuildDate>Mon, 06 Feb 2012 17:22:41 +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 firewall issues on Fedora</title>
		<link>http://www.tdmoose.com/2009/07/24/mysql-firewall-issues-on-fedora/</link>
		<comments>http://www.tdmoose.com/2009/07/24/mysql-firewall-issues-on-fedora/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 16:03:58 +0000</pubDate>
		<dc:creator>tdmoose</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.tdmoose.com/?p=84</guid>
		<description><![CDATA[This is my experience with making a MySQL database on one server accessible to a mysql client on another server. While this issue has been addressed extensively, I think the solution to my problem was something that was not mentioned in any of the sources I searched. Accessing the DB server worked on the local [...]]]></description>
			<content:encoded><![CDATA[<p>This is my experience with making a MySQL database on one server accessible to a mysql client on another server.  While this issue has been addressed extensively, I think the solution to my problem was something that was not mentioned in any of the sources I searched.</p>
<p>Accessing the DB server worked on the local machine, but, this was the message I received when attempting to access the it on a remote host.</p>
<p>&#8220;ERROR 2003 (HY000): Can&#8217;t connect to MySQL server on. . .&#8221;</p>
<p>I eliminated some other things as potential causes right away.  My permissions for the user and host were set properly.  The MySQL server was not started with the &#8220;skip-networking&#8221; option set, and the server was not restricting TCP access to localhost.</p>
<p>Narrowing this down to a firewall issue was pretty straightforward.  First, I stopped the firewall.</p>
<p>/sbin/service iptables stop</p>
<p>Then I tried again to access the DB server remotely and succeeded.  When I restarted the firewall, the problem returned.</p>
<p>Searching on the net, I came across this recommendation in many places.  Basically, a command to add an entry to open port 3306.</p>
<p>iptables -A INPUT -i eth0 -p tcp -m tcp &#8211;dport 3306 -j ACCEPT</p>
<p>I entered this but it still didn&#8217;t help.  Then, I began to look at the iptables configuration with this command.</p>
<p>ipatables-save</p>
<p>This just writes the iptables entries to STDOUT.  What I noticed was that the entry for port 3306 was preceded another line.  Here is how the two lines appeared.</p>
<p>-A INPUT -j REJECT &#8211;reject-with icmp-host-prohibited<br />
-A INPUT -i eth0 -p tcp -m tcp &#8211;dport 3306 -j ACCEPT</p>
<p>I sent the result of the &#8216;iptables-save&#8217; to a file and then edited this file and switched the order of the two lines above.  Then I restarted the firewall.</p>
<p>/sbin/services iptables restart</p>
<p>This worked and my databases have been accessible since.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tdmoose.com/2009/07/24/mysql-firewall-issues-on-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

