title: Cannot connect to Azure MySQL database from .NET Connector
body: <p>I tried to connect to the Azure MySQL database using MySQL Workbench and MySQL Shell and it works fine. Now I am trying to connect using following C# code:</p>
  
  <pre><code>var connStringBuilder = new MySqlConnectionStringBuilder
  {
      Server = "creatur-db.mysql.database.azure.com",
      Database = "test",
      UserID = "creatur_db_main@creatur-db",
      Password = "{my_password}",
      SslMode = MySqlSslMode.Preferred,
  };
  
  using (MySqlConnection connection = new MySqlConnection(connStringBuilder.ToString()))
  {
      connection.Open();
  
      connection.Close();
  }
  </code></pre>
  
  <p>Here I replaced <code>{my_password}</code> with password to the database and it gives me an exception inside Open method: </p>
  
  <blockquote>
    <p>MySql.Data.MySqlClient.MySqlException: 'Authentication to host
    'creatur-db.mysql.database.azure.com' for user
    'creatur_db_main@creatur-db' using method 'mysql_native_password'
    failed with message: The connection string may not be right. Please
    visit portal for references.</p>
  </blockquote>
  
  <p>I also tried different connection strings:</p>
  
  <pre><code>Server=creatur-db.mysql.database.azure.com; Port=3306; Database=test; Uid=creatur_db_main@creatur-db; Pwd={my_password}; SslMode=Preferred
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Database=test; Data Source=creatur-db.mysql.database.azure.com; User Id=creatur_db_main@creatur-db; Password={my_password}
  </code></pre>
  
  <p>But none of them worked.</p>
  
  <p>The same exception occurs when I create new connection using Server Explorer in Visual Studio 2013. It seems the error has something to do with .NET Connector. I tried to use different versions of MySQL.Data.dll, .NET Framework and Visual Studio but no luck.</p>