我分为下面三个步骤来解决:

(1):修改mysql数据库的编码为uft8mb4

(2):修改数据表的编码为utf8mb4

(3):修改连接数据库的连接代码

更改数据库编码:ALTER DATABASE caitu99 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

修改数据表的编码为utf8mb4

执行命令:ALTER TABLE TABLE_NAME CONVERT TO CHARACTER SET utf8mb4;

源文:https://blog.csdn.net/hzw19920329/article/details/55670782

Incorrect string value: '\xF0\x9F\x98\xAD",...' for column 'commentContent' at row 1的更多相关文章

  1. 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 今天在爬取 ...

  2. java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x8E' for column 'nick' at row 1

    java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x8E' for column 'nick' at row 1 mysql报错 ...

  3. java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\xB3' for column 'Content' at row 1

    在尝试将 emoji 表情符号 插入MySQL数据库时,遇到以下错误信息: ### The error occurred while setting parameters ### SQL: INSER ...

  4. java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x8E' for column 'name' at row 1

    我的错误案例: ,这个后台插不进去,就姓名那栏的中文编码问题. 遇到这个错误,应该是创建表的时候没有设置好编码,这个错误不用多想,我也试过在更改表那里设置编码,但还是不行,还是有残留 直接drop t ...

  5. Django1.10+Mysql 5.7存储emoji表情,报Incorrect string value: '\\xF0\\x9F\\x90\\xA8' for column 'signature' at row 1的解决方法

    问题: 在做webapp项目的时候,用户提交emoji数据,控制台报错:Incorrect string value: '\\xF0\\x9F\\x90\\xA8' for column 'signa ...

  6. 表情存储异常--mybatis抛出异常(java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'name' at row 1)

    文章参考 https://blog.csdn.net/junsure2012/article/details/42171035 https://www.cnblogs.com/WangYunShuai ...

  7. 解决pymysql.err.InternalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x8C\\xB8' for column 'headline' at row 1")

    解决pymysql.err.InternalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x8C\\xB8' for column ...

  8. mybatis抛出异常(java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'name' at row 1)

    文章参考 https://blog.csdn.net/junsure2012/article/details/42171035 https://www.cnblogs.com/WangYunShuai ...

  9. 【MySQL】java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\xB3' for column

    问题原因: 输入内容包含特殊字符,MySQL 中的列不支持. 解决方法 多数是修改 MySQL 的数据库和表结构,CHARSET 改为 utf8mb4,但本人测试还是不能传入 emoji. 后来在代码 ...

随机推荐

  1. springboot配置tomcat大全

    server.tomcat.accept-count=100 # Maximum queue length for incoming connection requests when all poss ...

  2. first集合follow集的求法

    FIRST集的定义 : 设G=(VT,VN,P,S)是上下文无关文法 FIRST(a)={a|a=>*ab,a∈VT, a,b∈V*} 若a=>*ε则规定ε∈FIRST (a) FIRST ...

  3. 没有rc.local的解决办法

    转载请注明来源https://www.cnblogs.com/sogeisetsu/p/11395098.html linux 开机自启动 我是小白,最近在想如何使用linux开机自启动,有一个办法是 ...

  4. Linux学习25-Xshell设置页面最大显示行数

    前言 在使用xshell查看日志的时候,有时候日志太多,往上翻的时候,前面的就找不到了. 需要设置xshell的页面显示最大行数,查看更多的日志详情. 设置显示行数 左上角-文件-属性 终端-设置最大 ...

  5. 项目Beta冲刺(团队) ——随笔集合

    课程名称:软件工程1916|W(福州大学) 作业要求:项目β冲刺(团队) 团队名称:葫芦娃队 作业目标:汇总这次冲刺项目的所有随笔文件. 队员学号 队员昵称 博客地址 041602421 der hi ...

  6. dart 中的 try on catch

    catch 捕获异常 捕获了一个异常后,就停止了捕获异常过程.捕获一个异常,你就有机会去处理它: try { breedMoreLlamas(); } on OutOfLlamasException ...

  7. *Bootstrap系列 - (1)概述

    参考 [1] v3.bootcss.com

  8. wordpress调用文章摘要,若无摘要则自动截取文章内容字数做为摘要

    以下是调用指定分类文章列表的一个方法,作者如果有填写文章摘要则直接调用摘要:如果文章摘要忘记写了则自动截取文章内容字数做为摘要.这个方法也适用于调用description标签 <ul> & ...

  9. 命令式&函数式:把大象关进冰箱里问题

    面向过程:把大象关进冰箱里: 把冰箱门打开=> 大象放冰箱里=> 冰箱门关上 面向对象: 冰箱.开门() 冰箱.放入(大象) 冰箱.关门() 函数式: 关进(冰箱,大象): 关门(放入(开 ...

  10. LeetCode 1100. Find K-Length Substrings With No Repeated Characters

    原题链接在这里:https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters/ 题目: Give ...