前言 做qq互联登录时发现一个问题,如果qq昵称中有表情时存入mysql数据库会报错. java.sql.SQLException: Incorrect string value: "ð" for colum n "name" at row 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.MysqlIO.checkErrorPacket(Mys…
utf-8编码可能2个字节.3个字节.4个字节的字符,但是MySQL的utf8编码只支持3字节的数据,而移动端的表情数据是4个字节的字符.如果直接往采用utf-8编码的数据库中插入表情数据,Java程序中将报SQL异常: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'name' at row 1 at com.mysql.jdbc.SQLError.createSQLException(…
在给mysql数据库备份时,报错: mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as crashed and should be repaired when using LOCK TABLES 如上错误的解决方法如下:1.进入数据库对该表进行检测: mysql> check tables pre_forum_thread;+------------------------------+--…