title: How to connect to a MySQL server running on a Virtual Machine
body: <p>I have a MySQL Server 5.5.32 running on Ubuntu 12.04. Ubuntu is being run on VM. Host platform is Windows 7. <strong>How can I connect with the Ubuntu's MySQL from Windows?</strong> </p>
  
  <p>I have done the following so far:</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
  
  FLUSH PRIVILEGES;
  </code></pre>
  
  <p>Running a <code>show grant for root;</code> displays this:</p>
  
  <pre><code>+-------------------------------------------------------------+
  | Grants for root@%                                           |
  +-------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION |
  +-------------------------------------------------------------+
  </code></pre>
  
  <p>But when I try to connect to this server from SQLYog running on Windows, I get an error <code>Error 2003 Cannot connect to mysql server on '192.168.xxx.xxx'</code>. </p>
  
  <p>The IP being feed to SQLYog, I got it from <code>ifconfig</code>. Supplied the inet addr.</p>
  
  <pre><code>inet addr:192.168.226.xxx  Bcast:192.168.226.yyy
  </code></pre>
  
  <p>Is the address being used is incorrect or are these grant issues? Please advice.</p>