在mysql直接查询中文正常,通过连接到mysql读取中文内容为乱码。同时插入中文内容也失败提示

Incorrect string value: '\xBC\xA4\xB7\xA2\xBF\xB4...' for column 'username' at row 1

在连接数据库的时候,在你的页面连接字符串中增加CharSet=UTF8; 这样读取出来中文ok了。

mysql net连接读取结果为乱码 Incorrect string value的更多相关文章

  1. Mysql插入数据报错java.sql.SQLException: Incorrect string value: '\xF0\x9F\x93\x8D\xE6\x88...'

    今天读取solr里面的数据,往mysql插入时报错, Incorrect string value: '\xF0\x9F\x93\x8D\xE8\x88...' for column 'title'  ...

  2. MySQL执行插入操作时报错1366 - Incorrect string value

    今天在测试mysql时,发现插入数据的问题,下面和大家分享下解决方法: 首先看问题原因: [Err] 1366 - Incorrect string value: '\xCF\xD6' for col ...

  3. MySql中报错:java.sql.SQLException: Incorrect string value: '\xF0\x9F\x90\xBB' for column

    问题描述: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x90\xBB' for column 'nickName' at row ...

  4. mysql报错:java.sql.SQLException: Incorrect string value: '\xE4\xB8\x80\xE6\xAC\xA1...' for column 'excelName' at row 1

    一.问题 用Eclipse做项目时候报错 java.sql.SQLException: Incorrect string value: '\xE4\xB8\x80\xE6\xAC\xA1...' fo ...

  5. django 保存中文到mysql 报错django.db.utils.DatabaseError: Incorrect string value: '\xE5\xBE\x88\xE7\x81\xB5

    分析: 1.尝试在Python中对数据转码成utf8,'中文'.encode("utf-8"),还是报错 2.观察堆栈发现应该是操作mysql数据库的时候,将数据插入表里出错 所以 ...

  6. mysql中添加数据时,报错(incorrect string value:'\xf0\x9f ) 字符转换不正确

    这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表情或者某些特殊字符是4个字节,而Mysql的utf8编码最多3个字节,所以数据插不进去. 在网上搜了一下解决问题的方案,我选了一 ...

  7. MySQL插入emoji表情报错 SQLException: Incorrect string value 的两种解决方案

    摘抄自:https://blog.csdn.net/dmw412724/article/details/81119325 原因:mysql的UTF-8只支持三个字节的存储,而一般字符是三个字节,但是e ...

  8. mysql进阶(二十二)MySQL错误之Incorrect string value: '\xE7\x81\xAB\xE7\x8B\x90...中文字符输入错误

    MySQL错误之Incorrect string value: '\xE7\x81\xAB\xE7\x8B\x90...' for column 'tout' at row 1中文字符输入错误 在实验 ...

  9. mysql 彻底解决:Incorrect string value: '\xF0\x9F\x98\xAD",...' for column 'commentContent' at row 1

    彻底解决:Incorrect string value: '\xF0\x9F\x98\xAD",...' for column 'commentContent' at row 1 今天在爬取 ...

随机推荐

  1. jquery-ui 之draggable详解

    举一个例子: <div class="box"> <div id="draggable"> <p>Drag me aroun ...

  2. Struts2 + Spring + Hibernate 通用 Service 和 DAO

    我在 Struts2 + Spring + Hibernate  项目开发中总结出了一个Service 和 DAO ,可以用于处理任何的pojo(bean).使用这两个Service 和 DAO 可以 ...

  3. PTA 5-15 PAT Judge (25分)

    /* * 1.主要就用了个sort对结构体的三级排序 */ #include "iostream" #include "algorithm" using nam ...

  4. xampp配置host和httpd可以随意访问任何本机的地址

    1.修改host 不管你用的是什么系统,windows, mac,电脑上都会有一个 hosts 文件,修改这个文件,可以改变主机名所对应的 ip 地址.比如你安装了 Web 开发环境(MAMP 或 W ...

  5. ASP.NET中配置应用程序

    1.   配置文件简介 1.1 分类 1.2关系 Machine.Config和Web.Config都是设置应用程序的配置信息,它们按照类似于继承的关系对应用程序起作用. Machine.Config ...

  6. WINHTTP的API接口说明。

    BOOL WINAPI WinHttpAddRequestHeaders(   _In_  HINTERNET hRequest,   _In_  LPCWSTR pwszHeaders,   _In ...

  7. js判断一个字符串是否在另一个字符串中存在 indexOf

    使用indexOf来实现.当返回值为-1时表示不存在. 举例: var href = 'www.51qdq.com';alert(href.indexOf('test')); //返回值 -1aler ...

  8. 将图片序列保存为GIF文件

    http://stackoverflow.com/questions/11459568/issue-with-rebuilding-and-saving-gifs-using-tgifimage 将图 ...

  9. 并查集类的c++封装,比較union_find algorithm四种实现方法之间的性能区别

    问题描写叙述: 在计算机科学中,并查集是一种树型的数据结构,其保持着用于处理一些不相交集合(Disjoint Sets)的合并及查询问题.有一个联合-查找算法(union-find algorithm ...

  10. java_jdbc_3层 解耦

    Dao - 提供接口 DaoImpl - 实现 DaoFactory - 工厂模式获取实现 DaoExcetpion - jdbc异常处理 实现runtime exception类即可 TestDem ...