title: C# - MySQL - MySql.Data.MySqlClient.MySqlStream.ReadPacket()
body: <p>I tried to connect to the mysql server via remote connection.</p>
  
  <p>The connection string is 
  server={IP};database={DB};uid={usernname};pwd={password};</p>
  
  <pre><code>        try {
              conn.Open();
              sqlCmd = conn.CreateCommand();
              sqlCmd.CommandText = sqlStr;
              reader = sqlCmd.ExecuteReader(); //-&gt;LINE 32
              while(reader.Read()) //Add to library
          } catch (Exception ex) { }
          finally {
             //Close connection and reader
          }
  </code></pre>
  
  <p>and i got this error.</p>
  
  <pre><code>08 June 2015 12:58:46 PM   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
     at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32&amp; affectedRow, Int64&amp; insertedId)
     at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32&amp; affectedRows, Int64&amp; insertedId)
     at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
     at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
     at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
     at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
     at ProgramTest.Program.Main() in C:\Projects\ProgramTest\ProgramTest\Program.cs:line 32
  </code></pre>
  
  <p>I tried to connect using Mysql Workbench and success receiving results.</p>
  
  <p>any code i missed that cause the problem?</p>
  
  <p>thanks in advance!</p>