title: how to connect to a mysql server running on a linux virtual machine in azure
body: <p>I searched a lot but not able to solve that problem.
  i am able to access MySQL server running on different windows machine. steps i have taken are</p>
  
  <ol>
  <li>changing my.ini file bind address to 0.0.0.0</li>
  <li>creating user and granting permission by <code>GRANT ALL PRIVILEGES ON DATABASE.* TO user@'%' IDENTIFIED BY 'password';</code></li>
  <li>from command line to windows MySQL server <code>mysql -h windows server ip -u user -p</code></li>
  </ol>
  
  <p>it works fine and from MySQL workbench i am able to connect for windows MySQL server from my machine. BUT when in Linux virtual machine i have done the same thing</p>
  
  <ol>
  <li>changing my.cnf file and change bind address to 0.0.0.0.</li>
  <li>creating user and granting permission by <code>GRANT ALL PRIVILEGES ON DATABASE.* TO user@'%' IDENTIFIED BY 'password';</code></li>
  <li><p>From command line to LINUX MySQL server <code>mysql -h linux server ip -u user -p</code></p>
  
  <p>but for that i am getting following error after giving password <strong>ERROR 2003 (HY000): Can't connect to MySQL server on 'linux server ip' (10060)</strong> also when connecting from c# by following connection string <code>&lt;add name="MySqlConnection" connectionString="Server=LINUX_VM_SERVER_IP;Database=database;Uid=user;Pwd=password" providerName="MySql.Data.MySqlClient" /&gt;</code>
  i am getting <strong>Error : Unable to find and specified mysql host</strong></p></li>
  <li><p>i have checked in LINUX_VM that 0.0.0.0:3306 is in listening status.</p></li>
  <li><p>if i try to telnet LINUX_VM MYSQL Server service using <code>/&gt;telnet
  LINUX_VM_IP 3306</code> i got the <strong>ERROR : Connecting To
  LINUX_VM_IP...Could not open connection to the host, on port 3306:</strong></p></li>
  </ol>