<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Dave Dash</title>
 <link href="http://davedash.com/tag/localhost/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/localhost"/>
 <updated>2012-04-07T22:42:44-07:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <entry>
   <title>tunneling and mysql</title>
   <link href="http://davedash.com/2008/10/22/tunneling-and-mysql/"/>
   <updated>2008-10-22T00:00:00-07:00</updated>
   <id>http://davedash.com/2008/10/22/tunneling-and-mysql</id>
   <content type="html">&lt;p&gt;I have a mysql server for &lt;a href=&quot;http://reviewsby.us/&quot;&gt;reviewsby.us&lt;/a&gt; that requires tunneling, and after establishing a tunnel like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deveshistan:~ dash* ssh user@host -L3307:database_server:3306
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I thought I could just do this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mysql -u mysql_user -P3307 -h localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I was wrong, &lt;code&gt;localhost&lt;/code&gt; should be &lt;code&gt;127.0.0.1&lt;/code&gt;, otherwise mysql will do things in socket mode:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mysql -u mysql_user -P3307 -h 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 

</feed>

