title: MySql's Exception : Variable 'character_set_client' can't be set to the value of 'utf16'
body: <p>Previously I use <em>sql server 2005</em> as my website database, and everything works well.
  now I have changed to <em>MySql server 5.5</em> database because it is open source.</p>
  
  <p>I used Navicat Premium to transfer my data from sql server to mysql. I use mysql workbench and navicat to manage my database. Problems come when i declare the connection to mysql database. here is my code:</p>
  
  <pre><code>    MySqlCommand cmdselect;
      MySqlConnection conNDB;
      MySqlDataReader Mydtr;
      string server = "localhost";
      string database = "maindb";
      string uid = "root";
      string password = "abc123";
      string strCon = "SERVER=" + server + ";" + "DATABASE=" +
      database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
      string strSelect = "SELECT * FROM announcement"; 
  
      conNDB = new MySqlConnection(strCon);
      conNDB.Open();
      cmdselect = new MySqlCommand(strSelect, conNDB);
      Mydtr = cmdselect.ExecuteReader();
  
      rptAnnounce.DataSource = Mydtr;
      rptAnnounce.DataBind();
  
      Mydtr.Close();
      conNDB.Close();
  </code></pre>
  
  <p>Reference to MySql.Data already set. Here i got this error message :</p>
  
  <blockquote>
    <p>Exception Details:
    MySql.Data.MySqlClient.MySqlException:
    Variable 'character_set_client' can't
    be set to the value of 'utf16'
    Error message stated this error occurs during connection.Open();</p>
  </blockquote>
  
  <p>When i keep on refreshing the error page, i got another error sometime. here is it:</p>
  
  <blockquote>
    <p>Exception Details: MySql.Data.MySqlClient.MySqlException: Expected end of data packet
    Error message stated this error occurs during Mydtr = cmdselect.ExecuteReader();</p>
  </blockquote>
  
  <p>I am new to mysql. i don know what problem is this. i guess this problem comes from database's setting or data, not my source code.</p>
  
  <p>anyone knows the solution? your help is greatly appreciated. i been trying for 4 days but cannot solve.</p>