开发者社区> 问答> 正文

UWP使用MySql.Data.RT.dll连接mysql抛异常System.A?报错

连接字符串:

"Server=localhost;Database=db;Uid=root;Pwd=*****;SslMode=None;"

报错信息

“System.ArgumentException”类型的异常在 mscorlib.ni.dll 中发生,但未在用户代码中进行处理


其他信息: 'windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.

展开
收起
爱吃鱼的程序员 2020-06-09 15:44:49 729 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    根据你的提示,是编码错误,指定了  windows-1252,不被支持,你可以提供更多的源码,然后看哪里错误的设置了编码。


    谢谢你的回复,我已经搞定,my.ini中设置character_set_server=utf8,后来因为中文乱码又设置了数据库的数据表的编码。
    2020-06-09 15:45:05
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像