title: How to access remote mysql host on Ubuntu inside VMware?
body: <p>I'm running Ubuntu 10.10 inside VMware fusion on Mac OSX Snow Leopard.  Inside ubuntu, I'm attempting to use command-line mysql to connect to a database hosted on a separate web server.  For some reason, mysql misinterprets the remote hostname as a local address, and is not able to connect to the database.</p>
  
  <p>Steps: (from ubuntu inside VMware) </p>
  
  <pre><code>mysql -u &lt;my-username&gt; -h mysql-2.sandbox.wrkng.net -p
  
  Enter Password: &lt;my password&gt;
  </code></pre>
  
  <p>expected: to log into mysql</p>
  
  <p>got: </p>
  
  <pre><code>ERROR 1045 (28000): Access denied for user '&lt;my-username&gt;'@'c-71-233-98-90.hds1.ma.comcast.net' (using password: YES)
  </code></pre>
  
  <p>Note that the hostname referenced in the error message is different than the one I inputted to the mysql command.</p>
  
  <p>Also, performing the same command from the Mac (host of the VM) terminal successfully connects to the database.</p>
  
  <p>I am not seasoned with VMware or linux, so I may be missing something obvious here -- it seems like somewhere along the way either ubuntu or the VM has a networking issue.  Note also that accessing the internet via ubuntu inside the VM works fine.</p>
  
  <p>Any help is greatly appreciated.  Thanks!</p>