V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
leesaijyun
V2EX  ›  MySQL

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

  •  
  •   leesaijyun · 2020-03-07 15:44:34 +08:00 · 2724 次点击
    这是一个创建于 1728 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 青春\/
    3 条回复    2020-03-09 16:08:11 +08:00
    guixiexiezou
        1
    guixiexiezou  
       2020-03-07 16:25:11 +08:00
    我也经常遇到过,给个参考吧。和导入数据的方式有关,如果用 navcat 导入有时候就会出现问题。如果是自己手写的导表工具,则不会出现这个问题。
    jin7
        2
    jin7  
       2020-03-07 22:49:33 +08:00
    navicat 有时候导出的数据再导入就会报错, dbforge studio for mysql 则不会
    leesaijyun
        3
    leesaijyun  
    OP
       2020-03-09 16:08:11 +08:00
    刚刚用命令行试了一下 , 好像是 navicat 工具的问题 , 命令行不会有问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2914 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:37 · PVG 11:37 · LAX 19:37 · JFK 22:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.