mysql中文乱码,我尝试过了任何方式。可还是乱码。编码我都改成utf8了。 ALTER DATABASE emsdatabase
       CHARACTER SET utf8
       DEFAULT CHARACTER SET utf8
       COLLATE utf8_general_ci
       DEFAULT COLLATE utf8_general_ci;
还有,C#连接mysql数据库时,web.config如下所示:<appSettings>
    <add key="ConnectionString" value="server=.;port=3306;user id=sa;password=123;database=emsdatabase;CharSet=utf8;Allow Zero Datetime=true"/>
  </appSettings>为什么报错Unable to connect to any of the specified MySQL host
请各位高手指教!

解决方案 »

  1.   

    http://database.51cto.com/art/201006/203462.htm
      

  2.   

    问个问题是不是odbc的provider错了?
      

  3.   

    server=.;
    这好像是SQL Server中用的表示方法吧,表示连接当前主机。
    MySQL中数据库连接字符串格式:
    "server=localhost;uid=root;pwd=root;database=test;";
      

  4.   

    这是修改数据库的编码。我都改成utf8了。为什么还没反应?
      

  5.   


    这是mysql数据库问题。不是Oracle。
      

  6.   

    是的!我解决了这个问题。但是C# 还是连不上mysql?怎么办?
      

  7.   

    中文编码应该用gb2312或gbk吧?