title: Connect to remote MySQL database using VB.NET 2010
body: <p>My connection string as follows.</p>
  
  <pre><code>conn.ConnectionString = "Server=192.248.***.***; Port=3036; User id=admin; password=***; Database=abc; Connect Timeout=60;"
  </code></pre>
  
  <p>But it returns error "Error connecting to database: Unable to connect to any of the specified MySQL hosts."</p>
  
  <p>But i can log in to the same using PHPMyAdmin. </p>
  
  <pre><code>//192.248.***.***/phpmyadmin
  </code></pre>
  
  <p>Also i can log in to local MySQL database using:</p>
  
  <pre><code>    conn.ConnectionString = "server=" &amp; "localhost" &amp; ";" &amp; "user id=" &amp; "admin" &amp; ";" &amp; "password=" &amp; "" &amp; ";" &amp; "database=abc"
  </code></pre>
  
  <p>What is the wrong in this code. I want to connect to the remote database since it is the requirement of the system. Any help please.</p>
  
  <p><strong>Update:</strong>
  In immediate window it shows:</p>
  
  <pre><code>    PassbookPrinter.vshost.exe Error: 0 : Unable to connect to any of the specified MySQL hosts.
  A first chance exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll
  </code></pre>