mysql 的 text 类型的一行奇怪数据

2020-03-07 15:44:34 +08:00
 leesaijyun
mysql7 以上,字段类型 text,( COLUMN `info` text CHARACTER SET utf8 COLLATE utf8_bin )
存进去 navicat 就变的很奇怪,其他行数据没问题,如果有这个数据就没办法编辑(这个数据其实还没完整,存进去就 data too long 了,实际还没到长度,后面数据不知道去哪了)
以下是数据:

[{"price_id":"1767","taocan_name":"7-8P 黑 [ 3 代-YF 触摸版] ","goods_name":"7 代 7P 8 代 8P 通用万能返回键 3 代 YF 适用苹果","goods_id":"246","goods_cover":"\/backend\/uploads\/20191019\/Fn5aMiLZSjL_Tu-P7Xc01LOqhBZ4.png","goods_price":"18.00","cost_price":"17.46","goods_num":"10"},{"price_id":"3001","taocan_name":"7-8P 金 买 [ 3 代-YF 触摸版] ","goods_name":"7 代 7P 8 代 8P 通用万能返回键 3 代 YF 适用苹果","goods_id":"246","goods_cover":"\/backend\/uploads\/20191019\/Fn5aMiLZSjL_Tu-P7Xc01LOqhBZ4.png","goods_price":"18.00","cost_price":"17.46","goods_num":"5"},{"price_id":"3002","taocan_name":"7-8P 玫瑰金 [ 3 代-YF 触摸版] ","goods_name":"7 代 7P 8 代 8P 通用万能返回键 3 代 YF 适用苹果","goods_id":"246","goods_cover":"\/backend\/uploads\/20191019\/Fn5aMiLZSjL_Tu-P7Xc01LOqhBZ4.png","goods_price":"18.00","cost_price":"17.46","goods_num":"10"},{"price_id":"8911","taocan_name":"荣 8C 盖板 [黑] ","goods_name":" [优品配] 适用华 W 荣 8C 荣 play 荣 20 青春\/畅 10S 荣 8 荣 play3 荣 V30 国产手机外屏 荣 9 荣 V10 荣 8X 9X 荣 20i\/荣 10 青春手机盖板","goods_id":"909","goods_cover":"\/backend\/uploads\/20191223\/FmXj9OJ288F83gL6BIIA_YJcgnKL.png","goods_price":"3.00","cost_price":"2.00","goods_num":"10"},{"price_id":"8915","taocan_name":"荣 8 盖板 [白] ","goods_name":" [优品配] 适用华 W 荣 8C 荣 play 荣 20 青春\/畅 10S 荣 8 荣 play3 荣 V30 国产手机外屏 荣 9 荣 V10 荣 8X 9X 荣 20i\/荣 10 青春手机盖板","goods_id":"909","goods_cover":"\/backend\/uploads\/20191223\/FmXj9OJ288F83gL6BIIA_YJcgnKL.png","goods_price":"3.00","cost_price":"2.00","goods_num":"10"},{"price_id":"8916","taocan_name":"荣 8 盖板 [金] ","goods_name":" [优品配] 适用华 W 荣 8C 荣 play 荣 20 青春\/畅 10S 荣 8 荣 play3 荣 V30 国产手机外屏 荣 9 荣 V10 荣 8X 9X 荣 20i\/荣 10 青春手机盖板","goods_id":"909","goods_cover":"\/backend\/uploads\/20191223\/FmXj9OJ288F83gL6BIIA_YJcgnKL.png","goods_price":"3.00","cost_price":"2.00","goods_num":"10"},{"price_id":"8912","taocan_name":"荣 play 盖板 [黑] ","goods_name":" [优品配] 适用华 W 荣 8C 荣 play 荣 20 青春\/畅 10S 荣 8 荣 play3 荣 V30 国产手机外屏 荣 9 荣 V10 荣 8X 9X 荣 20i\/荣 10 青春手机盖板","goods_id":"909","goods_cover":"\/backend\/uploads\/20191223\/FmXj9OJ288F83gL6BIIA_YJcgnKL.png","goods_price":"3.00","cost_price":"2.00","goods_num":"10"},{"price_id":"8914","taocan_name":"荣 8 盖板 [黑] ","goods_name":" [优品配] 适用华 W 荣 8C 荣 play 荣 20 青春\/
2711 次点击
所在节点    MySQL
3 条回复
guixiexiezou
2020-03-07 16:25:11 +08:00
我也经常遇到过,给个参考吧。和导入数据的方式有关,如果用 navcat 导入有时候就会出现问题。如果是自己手写的导表工具,则不会出现这个问题。
jin7
2020-03-07 22:49:33 +08:00
navicat 有时候导出的数据再导入就会报错, dbforge studio for mysql 则不会
leesaijyun
2020-03-09 16:08:11 +08:00
刚刚用命令行试了一下 , 好像是 navicat 工具的问题 , 命令行不会有问题

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/650704

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX