mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘

1.场景:

"UPDATE `gioet_instance` SET name ='"+reqObj.Name+"',properties='' WHERE id = id" 条件始终为真, 直接把整个表全更新了。需要恢复数据库。

2.问题:

恢复数据库时,mysql插入二进制数据到含有json类型的字段时提示:mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘_第1张图片 。导出sql文件备份时正常,导入就提示这个。

INSERT INTO `gioet_instance` VALUES (10,'389767',NULL,'沙盘地区',0,0,1,1,X'7B226964223A2031302C20226C6174223A202231222C20226C6E67223A202231222C202263697479223A202231222C20226D656D6F223A2022222C2022636F6E74616374223A202261646D696E222C20226469737472696374223A202231222C202270726F76696E6365223A202231222C2022656E746974795F6964223A2031307D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:04',1123598821738675201,'2021-03-08 14:44:24',1,0,NULL),(12,'389767','20200001','网关',0,19,7,10,X'7B226964223A2031322C20226970223A202231302E302E302E3632222C2022736569223A202231383030222C2022766572223A2022322E30222C20226E6F7465223A2022222C20226D6F64656C223A2022313937222C202261646472657373223A2022222C202263757272566572223A2022322E30222C20226E65745374617465223A20312C2022656E746974795F6964223A2031322C2022696F744E756D626572223A2022222C2022746370536572766572223A20223132332E35362E39302E39353A34303331222C2022696F744E756D4461746531223A2022222C2022696F744E756D4461746532223A2022222C2022666163696C69746965734964223A20223139227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:55',1123598821738675201,'2021-03-12 10:18:12',1,0,NULL),(13,'389767',NULL,'环境多合1',0,12,9,11,X'7B226964223A2031332C2022736169223A202231383030222C2022737469223A202231383030222C202275617274223A202231222C20226F66666C696E65223A202231222C2022656E746974795F6964223A2031332C2022676174657761794964223A20223230323030303031222C2022727341646472657373223A202231222C2022736D61727450617261223A2022222C2022736D61727454797065223A2022333330222C2022636F6E6E65637454797065223A2022313238222C2022736D6172744368616E6E656C223A202231227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:41:50',1123598821738675201,'2021-03-02 13:35:43',1,0,NULL),(15,'389767',NULL,'湿度',13,13,3,3,X'7B226964223A2031352C202241444C6F77223A2022222C2022414448696768223A2022222C202244415363616C65223A202232353030222C2022736D6172744964223A20223133222C20226C696D69744C6F77223A2022222C20226C6F636174696F6E223A2022222C2022636861726163746572223A2022222C2022656E746974795F6964223A2031352C20226C696D697448696768223A2022222C2022636865636B56616C7565223A202230222C202273656E736F7250617261223A2022222C202273656E736F7254797065223A20223335222C202273686F774C656E677468223A2022222C20226368616E6E656C54797065223A2022313930222C2022636F6E6E65637454797065223A2022313238222C2022726561646F7574556E6974223A2022222C2022666163696C69746965734964223A202231222C202273656E736F724368616E6E656C223A202230227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:43:25',1123598821738675201,'2021-02-24 21:20:49',1,0,NULL),(16,'389767',NULL,'温度1',13,13,3,3,X'7B226964223A2031362C202241444C6F77223A2022222C2022414448696768223A2022222C202244415363616C65223A202232353030222C2022736D6172744964223A20223133222C20226C696D69744C6F77223A2022222C20226C6F636174696F6E223A2022222C2022636861726163746572223A2022222C2022656E746974795F6964223A2031362C20226C696D697448696768223A2022222C2022636865636B56616C7565223A202230222C202273656E736F7250617261223A2022222C202273656E736F7254797065223A20223335222C202273686F774C656E677468223A2022222C20226368616E6E656C54797065223A2022313930222C2022636F6E6E65637454797065223A2022313238222C2022726561646F7574556E6974223A2022222C202273656E736F724368616E6E656C223A202231227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:44:33',1123598821738675201,'2021-03-12 16:49:02',1,0,NULL),(17,'389767',NULL,'光照',13,13,3,3,X'7B226964223A2031372C202241444C6F77223A2022222C2022414448696768223A2022222C202244415363616C65223A202232353030222C2022736D6172744964223A20223133222C20226C696D69744C6F77223A2022222C20226C6F636174696F6E223A2022222C2022636861726163746572223A2022222C2022656E746974795F6964223A2031372C20226C696D697448696768223A2022222C2022636865636B56616C7565223A202230222C202273656E736F7250617261223A2022222C202273656E736F7254797065223A20223333222C202273686F774C656E677468223A2022222C20226368616E6E656C54797065223A2022313930222C2022636F6E6E65637454797065223A2022313238222C2022726561646F7574556E6974223A2022222C2022666163696C69746965734964223A202231222C202273656E736F724368616E6E656C223A202232227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:45:26',1123598821738675201,'2021-02-24 21:20:53',1,0,NULL),(18,'389767',NULL,'大气压',13,13,3,3,X'7B226964223A2031382C202241444C6F77223A2022222C2022414448696768223A2022222C202244415363616C65223A202232353030222C2022736D6172744964223A20223133222C20226C696D69744C6F77223A2022222C20226C6F636174696F6E223A2022222C2022636861726163746572223A2022222C2022656E746974795F6964223A2031382C20226C696D697448696768223A2022222C2022636865636B56616C7565223A202230222C202273656E736F7250617261223A2022222C202273656E736F7254797065223A2022323235222C202273686F774C656E677468223A2022222C20226368616E6E656C54797065223A2022313930222C2022636F6E6E65637454797065223A2022313238222C2022726561646F7574556E6974223A2022222C2022666163696C69746965734964223A202231222C202273656E736F724368616E6E656C223A202233227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:46:01',1123598821738675201,'2021-02-24 21:20:55',1,0,NULL),(19,'389767',NULL,'大棚',0,10,2,2,X'7B226964223A2031392C202270686F6E65223A2022222C2022636F6E74616374223A202261646D696E222C20226C6F636174696F6E223A202231222C2022656E746974795F6964223A2031392C2022676174657761794964223A20223230323030303031227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 15:33:39',1123598821738675201,'2021-03-05 10:31:19',1,0,NULL),(22,'389767',NULL,'告警',NULL,19,NULL,24,X'7B226964223A2032322C202268696768223A2022222C20226C6576656C223A2022222C20226C6F776572223A2022222C20226F6666736574223A2022222C202273656E6F72694964223A2022222C2022656E746974795F6964223A2032322C2022676174657761794964223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-03-06 14:10:55',1123598821738675201,'2021-03-06 14:10:55',1,0,NULL),(23,'389767',NULL,'昌平地区',NULL,0,NULL,1,X'7B226964223A2032332C20226C6174223A2022222C20226C6E67223A2022222C202263697479223A2022222C20226D656D6F223A2022222C202270686F6E65223A2022222C202261646472657373223A2022222C2022636F6E74616374223A2022222C20226469737472696374223A2022222C202270726F76696E6365223A2022222C2022656E746974795F6964223A2032337D',NULL,1123598821738675201,1123598813738675201,'2021-03-06 14:22:07',1123598821738675201,'2021-03-06 14:22:07',1,0,NULL),(24,'389767',NULL,'摄像头',NULL,19,6,141,X'7B226964223A2032342C202274797065223A2022222C202275726C5F686C73223A2022687474703A2F2F686C7330316F70656E2E7973372E636F6D2F6F70656E6C6976652F36373862653864633563653534666562222C20226465766963654964223A2022222C202275726C5F72746D70223A202272746D703A2F2F72746D7030316F70656E2E7973372E636F6D2F6F70656E6C6976652F363738626538646335636535346665222C2022656E746974795F6964223A2032347D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL),(25,'389767',NULL,'格控_启停',0,12,5,11,X'7B226964223A2032352C2022736169223A202231383030222C2022737469223A202231383030222C202275617274223A202231222C20226F66666C696E65223A202231222C2022656E746974795F6964223A2032352C2022676174657761794964223A20223230323030303031222C2022727341646472657373223A202231222C2022736D61727450617261223A2022222C2022736D61727454797065223A2022333135222C2022636F6E6E65637454797065223A2022313238222C2022736D6172744368616E6E656C223A202231227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:41:50',1123598821738675201,'2021-03-02 13:35:43',1,0,NULL),(26,'389767',NULL,'外通风_控制#1',25,25,5,3,X'7B226964223A2032362C202241444C6F77223A2022222C2022414448696768223A2022222C202244415363616C65223A202232353030222C2022736D6172744964223A20223235222C20226C696D69744C6F77223A2022222C20226C6F636174696F6E223A2022222C2022636861726163746572223A2022222C2022656E746974795F6964223A2032362C20226C696D697448696768223A2022222C2022636865636B56616C7565223A202230222C202273656E736F7250617261223A2022302C31222C202273656E736F7254797065223A202231222C202273686F774C656E677468223A2022222C20226368616E6E656C54797065223A202232222C2022636F6E6E65637454797065223A2022313238222C2022726561646F7574556E6974223A2022222C2022666163696C69746965734964223A202231222C202273656E736F724368616E6E656C223A2022302C31227D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:43:25',1123598821738675201,'2021-03-12 14:41:25',1,0,NULL),(27,'389767',NULL,'摄像头2',NULL,10,6,141,X'7B226964223A2032372C202274797065223A2022222C202275726C5F686C73223A2022687474703A2F2F686C7330316F70656E2E7973372E636F6D2F6F70656E6C6976652F36373862653864633563653534666562222C20226465766963654964223A2022222C202275726C5F72746D70223A202272746D703A2F2F72746D7030316F70656E2E7973372E636F6D2F6F70656E6C6976652F363738626538646335636535346665222C2022656E746974795F6964223A2032377D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-06 11:23:54',1,0,NULL),(28,'389767',NULL,'玉米_种值计划',0,19,10,181,X'7B226964223A2032382C20224E6F6465223A20225B7B5C22706F735C223A5C22E5A487E692ADE69C9F305C222C5C227374617274305C223A5C22323032312D30352D31395C222C5C22656E64305C223A5C22323032312D30362D30325C222C5C2273746172745C223A5C22323032312D30352D31395C222C5C22656E645C223A5C22323032312D30362D30325C222C5C226461795C223A5C2231335C222C5C226A6F625C223A5B7B5C22747970655C223A5C22305C222C5C226E616D655C223A5C22E695B4E59CB05C222C5C22636F6E645C223A5C22E697A05C222C5C226F70655C223A5C22E692ADE5898DE695B4E59CB02CE88BA5E7A78BE5ADA3E69CAAE695B4E59CB0EFBC8CE58FAFE4BA8EE692ADE7A78DE5898DE4B8A4E591A8E8BF9BE8A18CE9A1B6E6B586E695B4E59CB0E380825C222C5C22696E707574735C223A5B7B5C22696E7075745C223A5C22E6B0B45C222C5C226E756D5C223A5C22315C227D5D2C5C22746F6F6C735C223A5B7B5C22746F6F6C5C223A5C22E78A815C222C5C226E756D5C223A5C22315C227D2C7B5C22746F6F6C5C223A5C22E7899B5C222C5C226E756D5C223A5C22315C227D5D7D2C7B5C22747970655C223A5C22305C222C5C226E616D655C223A5C22E696BDE882A55C222C5C22636F6E645C223A5C22E5AE9EE696BDE69DA1E4BBB65C222C5C226F70655C223A5C22E58FAFE7A78DE38081E882A5E5908CE692AD5C222C5C22696E707574735C223A5B7B5C22696E7075745C223A5C22E696B9E6A18831EFBC9AE5B0BFE7B4A031336B675C222C5C226E756D5C223A5C22315C227D2C7B5C22696E7075745C223A5C22E7A1ABE985B8E992BE382E336B675C222C5C226E756D5C223A5C22315C227D5D2C5C22746F6F6C735C223A5B7B5C22746F6F6C5C223A5C22E99484E5A4B45C222C5C226E756D5C223A5C22325C227D5D7D5D7D2C7B5C22706F735C223A5C22E692ADE7A78DE69C9F315C222C5C227374617274305C223A5C22323032312D30362D325C222C5C22656E64305C223A5C22323032312D30362D30395C222C5C2273746172745C223A5C22323032312D30362D30325C222C5C22656E645C223A5C22323032312D30362D30395C222C5C226461795C223A5C22375C227D5D222C202253656564223A2022E78E89E7B1B3222C20224D656368616E6963223A202231222C202254656C6570686F6E65223A20223138393130313131313131222C2022656E746974795F6964223A2032382C2022466163696C69746965734944223A20223139222C2022506C616E74696E6741726561223A20223130222C2022506C616E74696E67506C616E223A20227B7D222C202241637475616C456E6454696D65223A2022323032312D30352D32342032313A32303A3439222C202243726F70566172696574696573223A202231222C2022506572736F6E496E436861726765223A202261646D696E222C2022457374696D61746564456E6454696D65223A2022323032312D30352D32342032313A32303A3439222C202254726163656162696C697479436F6465223A2022303030303031222C2022506C616E74696E67537461727454696D65223A2022323032312D30322D32342032313A32303A3439222C2022457374696D6174656450726F64756374696F6E223A20223230227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-05-07 16:16:23',1,0,NULL),(29,'389767',NULL,'玉米_种值方案',0,19,191,196,X'7B226964223A2032392C20224E616D65223A2022E78E89E7B1B3222C202253656564223A2022E78E89E7B1B3222C2022536368656D65223A20225B207B205C22706F735C223A5C22E5A487E692ADE69C9F305C222C205C227374617274305C223A5C22323032312D30352D31395C222C205C22656E64305C223A5C22323032312D30362D30325C222C205C2273746172745C223A5C22323032312D30352D31395C222C205C22656E645C223A5C22323032312D30362D30325C222C205C226461795C223A5C2231335C222C20202020202020205C226A6F625C223A5B207B20202020205C22747970655C223A5C22305C222C20202020205C226E616D655C223A5C22E695B4E59CB05C222C20202020205C22636F6E645C223A5C22E697A05C222C20202020205C226F70655C223A5C22E692ADE5898DE695B4E59CB02CE88BA5E7A78BE5ADA3E69CAAE695B4E59CB0EFBC8CE58FAFE4BA8EE692ADE7A78DE5898DE4B8A4E591A8E8BF9BE8A18CE9A1B6E6B586E695B4E59CB0E380825C222C20202020205C22696E707574735C223A5B2020202020202020207B202020202020202020202020205C22696E7075745C223A5C22E6B0B45C222C202020202020202020202020205C226E756D5C223A5C22315C222020202020202020207D20202020205D2C20202020205C22746F6F6C735C223A5B2020202020202020207B202020202020202020202020205C22746F6F6C5C223A5C22E78A815C222C202020202020202020202020205C226E756D5C223A5C22315C222020202020202020207D2C2020202020202020207B202020202020202020202020205C22746F6F6C5C223A5C22E7899B5C222C202020202020202020202020205C226E756D5C223A5C22315C222020202020202020207D20202020205D207D2C207B20202020205C22747970655C223A5C22305C222C20202020205C226E616D655C223A5C22E696BDE882A55C222C20202020205C22636F6E645C223A5C22E5AE9EE696BDE69DA1E4BBB65C222C20202020205C226F70655C223A5C22E58FAFE7A78DE38081E882A5E5908CE692AD5C222C20202020205C22696E707574735C223A5B2020202020202020207B202020202020202020202020205C22696E7075745C223A5C22E696B9E6A18831EFBC9AE5B0BFE7B4A031336B675C222C202020202020202020202020205C226E756D5C223A5C22315C222020202020202020207D2C2020202020202020207B202020202020202020202020205C22696E7075745C223A5C22E7A1ABE985B8E992BE382E336B675C222C202020202020202020202020205C226E756D5C223A5C22315C222020202020202020207D20202020205D2C20202020205C22746F6F6C735C223A5B2020202020202020207B202020202020202020202020205C22746F6F6C5C223A5C22E99484E5A4B45C222C202020202020202020202020205C226E756D5C223A5C22325C222020202020202020207D20202020205D207D205D207D2C207B205C22706F735C223A5C22E692ADE7A78DE69C9F315C222C205C227374617274305C223A5C22323032312D30362D325C222C205C22656E64305C223A5C22323032312D30362D30395C222C205C2273746172745C223A5C22323032312D30362D30325C222C205C22656E645C223A5C22323032312D30362D30395C222C205C226461795C223A5C22375C222020202020207D205D222C202250686F746F55524C223A202268747470733A2F2F67696D67322E62616964752E636F6D2F696D6167655F7365617263682F7372633D68747470253341253246253246647069632E7469616E6B6F6E672E636F6D2532466365253246636A253246514A363937323934303130332E6A70672672656665723D68747470253341253246253246647069632E7469616E6B6F6E672E636F6D266170703D323030322673697A653D66393939392C313030303026713D613830266E3D3026673D306E26666D743D6A7065673F7365633D3136323130363032313926743D6365313662356530333665393264333765666536373135323865373438336432222C2022656E746974795F6964223A2032392C202243726F70566172696574696573223A2022E78E89E7B1B3222C2022506C616E74696E674379636C65223A2022313030222C202252656C6576616E7445787065727473223A2022E99988E58D9AE5A3AB222C2022446E6F776C656467654261736555524C223A202268747470733A2F2F7777772E706C616E74706C75732E636E2F636E2F73702F2545372538452538392545382539432538302545392542422538443F743D70227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-28 14:02:42',1,0,NULL),(30,'389767',NULL,'玉米_农事记录',0,19,191,194,X'7B226964223A2033302C202254797065223A2022E5869CE4BA8BE6938DE4BD9C222C2022496E70757473223A2022313131222C2022456E6444617465223A2022323032312D30342D31345431363A30303A30302E3030305A222C20224465736372696265223A2022313131222C20224D656368616E6963223A202231313131222C2022576F726B54797065223A2022313131222C2022537461727444617465223A2022323032312D30342D31345431363A30303A30302E3030305A222C2022656E746974795F6964223A2033302C202244656C6179526561736F6E223A2022E5869CE5BF99222C202254726163656162696C6974794944223A20223131313131227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-15 15:31:14',1,0,NULL),(31,'389767',NULL,'玉米_农技服务记录',0,19,191,197,X'7B226964223A2033312C20225374617465223A20224F4B222C2022656E746974795F6964223A2033312C202253657276696365466565223A20223130222C20225365727669636554696D65223A2022313131222C20225365727669636554797065223A2022646464222C2022437573746F6D6572436F6465223A2022313131222C202253657276696365506572736F6E223A2022646464222C202253657276696365436F6E74656E74223A2022646464222C20224170706C69636174696F6E54696D65223A202264646464222C20224170706C69636174696F6E436F6E74656E74223A20223131227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-15 15:31:18',1,0,NULL),(32,'389767',NULL,'玉米_识别记录',0,0,191,195,X'7B226964223A2033322C202254797065223A2022E79785E5AEB3222C20225374617465223A2022E4B893E5AEB6E5B7B2E8AF86E588AB222C202243617465676F7279223A2022E78E89E7B1B3222C202250686F746F55524C223A2022687474703A2F2F696D67362E69706C616E742E636E2F696D616765322F622F343039303937362E6A7067222C20224170706C6963616E74223A202261646D696E222C2022656E746974795F6964223A2033322C2022456E67696E65526573756C7473223A20225B202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313131322C20202020202020202020202020202020205C226E616D655C223A205C22E798A4E9BB91E7B289E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C223937255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F423633453236424433394242354534322E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313134352C20202020202020202020202020202020205C226E616D655C223A205C22E5A4A7E69691E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22322E37255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F454146353139383645303034453635432E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A203131313137322C20202020202020202020202020202020205C226E616D655C223A205C22E9BB91E4B89DE7A997E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22302E33255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F444332394239383942383845414139442E6A70675C22202020202020202020202020207D2020202020202020205D222C20224964656E7469667950656F706C65223A2022E69D8EE69599E68E88222C20224172746966696369616C526573756C7473223A20225B202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313131322C20202020202020202020202020202020205C226E616D655C223A205C22E798A4E9BB91E7B289E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C223937255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F423633453236424433394242354534322E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313134352C20202020202020202020202020202020205C226E616D655C223A205C22E5A4A7E69691E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22322E37255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F454146353139383645303034453635432E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A203131313137322C20202020202020202020202020202020205C226E616D655C223A205C22E9BB91E4B89DE7A997E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22302E33255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F444332394239383942383845414139442E6A70675C22202020202020202020202020207D2020202020202020205D222C20224964656E74696669636174696F6E54696D65223A2022323032312D30342D32375431363A30303A30302E3030305A222C2022456E67696E65446973706C6179526573756C7473223A20225B202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313131322C20202020202020202020202020202020205C226E616D655C223A205C22E798A4E9BB91E7B289E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C223937255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F423633453236424433394242354534322E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313134352C20202020202020202020202020202020205C226E616D655C223A205C22E5A4A7E69691E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22322E37255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F454146353139383645303034453635432E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A203131313137322C20202020202020202020202020202020205C226E616D655C223A205C22E9BB91E4B89DE7A997E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22302E33255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F444332394239383942383845414139442E6A70675C22202020202020202020202020207D2020202020202020205D222C20224964656E74696669636174696F6E446576696365223A2022312DE6898BE69CBA222C20224172746966696369616C526573756C7473446973706C6179223A20225B202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313131322C20202020202020202020202020202020205C226E616D655C223A205C22E798A4E9BB91E7B289E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C223937255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F423633453236424433394242354534322E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A20313134352C20202020202020202020202020202020205C226E616D655C223A205C22E5A4A7E69691E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22322E37255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F454146353139383645303034453635432E6A70675C22202020202020202020202020207D2C202020202020202020202020207B20202020202020202020202020202020205C2269645C223A203131313137322C20202020202020202020202020202020205C226E616D655C223A205C22E9BB91E4B89DE7A997E797855C222C20202020202020202020202020202020205C2270726F626162696C6974795C223A205C22302E33255C222C20202020202020202020202020202020205C22696D61676555726C5C223A205C22687474703A2F2F696D67312E69706C616E742E636E2F676F746F696D672F3233362F444332394239383942383845414139442E6A70675C22202020202020202020202020207D2020202020202020205D227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-28 16:34:19',1,0,NULL),(34,'389767',NULL,'玉米_识别记录2',0,0,191,195,X'7B226964223A2033347D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL),(1377153719320498178,NULL,NULL,NULL,NULL,0,NULL,197,X'7B226964223A20313337373135333731393332303439383137382C20225374617465223A2022222C2022656E746974795F6964223A20313337373135333731393332303439383137382C202253657276696365466565223A2022222C20225365727669636554696D65223A2022222C20225365727669636554797065223A2022222C2022437573746F6D6572436F6465223A2022222C202253657276696365506572736F6E223A2022222C202253657276696365436F6E74656E74223A2022222C20224170706C69636174696F6E54696D65223A20226173646161222C20224170706C69636174696F6E436F6E74656E74223A20227364617364227D',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:00:08',1123598821738675201,'2021-03-31 15:00:08',1,0,NULL),(1377154764167761921,NULL,NULL,NULL,NULL,0,NULL,197,X'7B226964223A20313337373135343736343136373736313932312C20225374617465223A2022222C2022656E746974795F6964223A20313337373135343736343136373736313932312C202253657276696365466565223A2022303030222C20225365727669636554696D65223A2022323032312D30362D3038222C20225365727669636554797065223A2022E5869CE4BA8BE69C8DE58AA1222C2022437573746F6D6572436F6465223A2022222C202253657276696365506572736F6E223A2022E585ADE58FB7E4BD8D222C202253657276696365436F6E74656E74223A2022E6909CE7B4A2222C20224170706C69636174696F6E54696D65223A2022323032302D30352D3036222C20224170706C69636174696F6E436F6E74656E74223A202231363534227D',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:04:17',1123598821738675201,'2021-03-31 15:04:17',1,0,NULL),(1377158466677035009,NULL,NULL,NULL,NULL,0,NULL,197,X'7B226964223A20313337373135383436363637373033353030392C20225374617465223A2022E69CAAE5AE8CE68890222C2022656E746974795F6964223A20313337373135383436363637373033353030392C202253657276696365466565223A2022E58D81E5A4A7222C20225365727669636554696D65223A2022E998BFE890A8E8BEBE61222C20225365727669636554797065223A2022E998BFE890A8E8BEBE222C2022437573746F6D6572436F6465223A2022222C202253657276696365506572736F6E223A2022E998BFE890A8E8BEBE222C202253657276696365436F6E74656E74223A2022E998BFE890A8E8BEBE222C20224170706C69636174696F6E54696D65223A2022617364222C20224170706C69636174696F6E436F6E74656E74223A2022617364227D',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:18:59',1123598821738675201,'2021-03-31 15:19:00',1,0,NULL),(1380781728606769154,NULL,NULL,NULL,NULL,0,NULL,197,X'7B226964223A20313338303738313732383630363736393135342C20225374617465223A2022E69CAAE5AE8CE68890222C2022656E746974795F6964223A20313338303738313732383630363736393135342C202253657276696365466565223A2022737373222C20225365727669636554696D65223A2022737373222C20225365727669636554797065223A20227373222C2022437573746F6D6572436F6465223A2022222C202253657276696365506572736F6E223A2022737373222C202253657276696365436F6E74656E74223A2022737373222C20224170706C69636174696F6E54696D65223A2022E8AF95E8AF95222C20224170706C69636174696F6E436F6E74656E74223A20227373227D',NULL,1123598821738675201,1123598813738675201,'2021-04-10 15:16:32',1123598821738675201,'2021-04-10 15:16:33',1,0,NULL),(1383562487222554626,NULL,NULL,NULL,NULL,0,NULL,181,X'7B226964223A20313338333536323438373232323535343632362C20224E6F6465223A2022222C202253656564223A2022313233222C20224D656368616E6963223A2022222C202254656C6570686F6E65223A2022617765646177222C2022656E746974795F6964223A20313338333536323438373232323535343632362C2022466163696C69746965734944223A2022222C2022506C616E74696E6741726561223A2022313233222C2022506C616E74696E67506C616E223A2022E68891E8AFB4E79A84222C202241637475616C456E6454696D65223A2022736432222C202243726F70566172696574696573223A202232313233222C2022506572736F6E496E436861726765223A20226177656532222C2022457374696D61746564456E6454696D65223A202261733277222C202254726163656162696C697479436F6465223A202220E5928BE595A5E5A4A7E4BA8BE79A84323331323232222C2022506C616E74696E67537461727454696D65223A2022617364222C2022457374696D6174656450726F64756374696F6E223A20223435227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 07:26:17',1123598821738675201,'2021-04-18 07:26:17',1,0,NULL),(1383567415483617282,NULL,NULL,NULL,NULL,0,NULL,181,X'7B226964223A20313338333536373431353438333631373238322C20224E6F6465223A2022222C202253656564223A2022323232222C20224D656368616E6963223A2022222C202254656C6570686F6E65223A20223232222C2022656E746974795F6964223A20313338333536373431353438333631373238322C2022466163696C69746965734944223A20223139222C2022506C616E74696E6741726561223A2022323232222C2022506C616E74696E67506C616E223A2022323232323232323232222C202241637475616C456E6454696D65223A20223232222C202243726F70566172696574696573223A20223232222C2022506572736F6E496E436861726765223A20223232323232222C2022457374696D61746564456E6454696D65223A20223232323232222C202254726163656162696C697479436F6465223A202232323232222C2022506C616E74696E67537461727454696D65223A202232323232222C2022457374696D6174656450726F64756374696F6E223A20223232323232227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 07:45:52',1123598821738675201,'2021-04-18 07:45:52',1,0,NULL),(1383664210461118465,NULL,NULL,NULL,NULL,0,NULL,195,X'7B226964223A20313338333636343231303436313131383436352C202254797065223A2022222C20225374617465223A2022E7AD89E5BE85E4B893E5AEB6E8AF86E588AB222C202243617465676F7279223A2022E795AAE88C84222C202250686F746F55524C223A2022687474703A2F2F3132332E35362E39302E39353A393030302F67696F657461646D696E2F75706C6F61642F32303231303431382F34376565376538653134396338653539346331616161343861393535323233332E706E67222C20224170706C6963616E74223A2022E7AEA1E79086E59198222C2022656E746974795F6964223A20313338333636343231303436313131383436352C2022456E67696E65526573756C7473223A2022222C20224964656E7469667950656F706C65223A2022222C20224172746966696369616C526573756C7473223A2022222C20224964656E74696669636174696F6E54696D65223A2022222C2022456E67696E65446973706C6179526573756C7473223A2022222C20224964656E74696669636174696F6E446576696365223A2022222C20224172746966696369616C526573756C7473446973706C6179223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:10:30',1123598821738675201,'2021-04-18 14:10:30',1,0,NULL),(1383664407870230529,NULL,NULL,NULL,NULL,0,NULL,195,X'7B226964223A20313338333636343430373837303233303532392C202254797065223A2022222C20225374617465223A2022E7AD89E5BE85E4B893E5AEB6E8AF86E588AB222C202243617465676F7279223A2022E795AAE88C84222C202250686F746F55524C223A2022687474703A2F2F3132332E35362E39302E39353A393030302F67696F657461646D696E2F75706C6F61642F32303231303431382F34376565376538653134396338653539346331616161343861393535323233332E706E67222C20224170706C6963616E74223A2022E7AEA1E79086E59198222C2022656E746974795F6964223A20313338333636343430373837303233303532392C2022456E67696E65526573756C7473223A2022222C20224964656E7469667950656F706C65223A2022222C20224172746966696369616C526573756C7473223A2022222C20224964656E74696669636174696F6E54696D65223A2022222C2022456E67696E65446973706C6179526573756C7473223A2022222C20224964656E74696669636174696F6E446576696365223A2022222C20224172746966696369616C526573756C7473446973706C6179223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:11:17',1123598821738675201,'2021-04-18 14:11:17',1,0,NULL),(1383664480184225793,NULL,NULL,NULL,NULL,0,NULL,195,X'7B226964223A20313338333636343438303138343232353739332C202254797065223A2022222C20225374617465223A2022E7AD89E5BE85E4B893E5AEB6E8AF86E588AB222C202243617465676F7279223A2022E795AAE88C84222C202250686F746F55524C223A2022687474703A2F2F3132332E35362E39302E39353A393030302F67696F657461646D696E2F75706C6F61642F32303231303431382F34376565376538653134396338653539346331616161343861393535323233332E706E67222C20224170706C6963616E74223A2022E7AEA1E79086E59198222C2022656E746974795F6964223A20313338333636343438303138343232353739332C2022456E67696E65526573756C7473223A2022222C20224964656E7469667950656F706C65223A2022222C20224172746966696369616C526573756C7473223A2022222C20224964656E74696669636174696F6E54696D65223A2022222C2022456E67696E65446973706C6179526573756C7473223A2022222C20224964656E74696669636174696F6E446576696365223A2022222C20224172746966696369616C526573756C7473446973706C6179223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:11:34',1123598821738675201,'2021-04-18 14:11:34',1,0,NULL),(1383679592320258049,NULL,NULL,NULL,NULL,0,NULL,195,X'7B226964223A20313338333637393539323332303235383034392C202254797065223A2022222C20225374617465223A2022E7AD89E5BE85E4B893E5AEB6E8AF86E588AB222C202243617465676F7279223A2022E795AAE88C84222C202250686F746F55524C223A2022687474703A2F2F3132332E35362E39302E39353A393030302F67696F657461646D696E2F75706C6F61642F32303231303431382F31306563333632336665653764653861363862383837326335653536353865622E706E67222C20224170706C6963616E74223A2022E7AEA1E79086E59198222C2022656E746974795F6964223A20313338333637393539323332303235383034392C2022456E67696E65526573756C7473223A2022222C20224964656E7469667950656F706C65223A2022222C20224172746966696369616C526573756C7473223A2022222C20224964656E74696669636174696F6E54696D65223A2022222C2022456E67696E65446973706C6179526573756C7473223A2022222C20224964656E74696669636174696F6E446576696365223A2022222C20224172746966696369616C526573756C7473446973706C6179223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:11:37',1123598821738675201,'2021-04-18 15:11:37',1,0,NULL),(1383681284189245441,'389767',NULL,'测试',NULL,19,NULL,153,X'7B226964223A20313338333638313238343138393234353434312C202270617261223A2022222C2022736D6172744964223A2022222C202274696D65456E64223A2022222C202273656E736F724964223A2022222C202274696D6553746172223A2022222C2022656E746974795F6964223A20313338333638313238343138393234353434312C2022676174657761794964223A2022222C2022736D6172744368616E6E656C223A2022222C202273656E736F724368616E6E656C223A2022227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:18:20',1123598821738675201,'2021-04-18 15:18:20',1,0,NULL),(1383683644902920194,NULL,NULL,NULL,NULL,0,NULL,197,X'7B226964223A20313338333638333634343930323932303139342C20225374617465223A2022E69CAAE5AE8CE68890222C2022656E746974795F6964223A20313338333638333634343930323932303139342C202253657276696365466565223A20223030222C20225365727669636554696D65223A202230222C20225365727669636554797065223A20223030222C2022437573746F6D6572436F6465223A2022222C202253657276696365506572736F6E223A20223030222C202253657276696365436F6E74656E74223A20223030222C20224170706C69636174696F6E54696D65223A202230303030222C20224170706C69636174696F6E436F6E74656E74223A20223030227D',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:27:43',1123598821738675201,'2021-04-18 15:27:43',1,0,NULL),(1383683644902920200,'389767',NULL,'玉米_识别记录',0,0,191,195,X'7B226964223A20313338333638333634343930323932303230302C202250686F746F55524C223A2022756E646566696E6564227D',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL);

3.解决总结:

把备份导入本地数据库(提示错误,继续执行),

在本地把字段类型为json先改为varchar (这个可以识别二进制),执行 提示错误的那条sql .可以看到数据了。

在本地用mysqldump命令导出,找到上面问题表插入的sql(是字符串了),

再在服务器上执行这个sql,查看数据库正常,完成。

注:如果json用的多了,恢复备份还是个问题

 

4.解决步骤:

插入字符串到json字段是正常的,比如'{}',插入二进制报上面错误。

这样的,X'7B226964223A2031302C20226C6174223A202231222C20226C6E67223A202231222C202263697479223A202231222C20226D656D6F223A2022222C2022636F6E74616374223A202261646D696E222C20226469737472696374223A202231222C202270726F76696E6365223A202231222C2022656E746974795F6964223A2031307D'二时制就不行。怎么办呢?

INSERT INTO `gioet_instance` (tenant_id,name,parent_id,model_id,properties) VALUES ('389767','name',0,195,'{}');

用终端试试。sql弄短一些,只插一条就看看X''不能识别,用终端也是一样。怎么办?

 

cd C:\Program Files\MySQL\MySQL Server 8.0\bin
mysql -u root -p
#密码


mysql> use blade;
Database changed

#插入sql语句 字符串
mysql> INSERT INTO `gioet_instance` VALUES (10,'389767',NULL,'沙盘地区',0,0,1,1,'{}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:04',1123598821738675201,'2021-03-08 14:44:24',1,0,NULL);
Query OK, 1 row affected (0.00 sec)

#插入sql语句 二进制
mysql> INSERT INTO `gioet_instance` VALUES (10,'389767',NULL,'沙盘地区',0,0,1,1,X'7B226964223A2031302C20226C6174223A202231222C20226C6E67223A202231222C202263697479223A202231222C20226D656D6F223A2022222C2022636F6E74616374223A202261646D696E222C20226469737472696374223A202231222C202270726F76696E6365223A202231222C2022656E746974795F6964223A2031307D',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:04',1123598821738675201,'2021-03-08 14:44:24',1,0,NULL);
ERROR 3144 (22032): Cannot create a JSON value from a string with CHARACTER SET 'binary'.

我现在也不能改成string,我代码里都是用json处理。

先改数据结构该字段类型由json改为VarChar 5000,再插入正常。数据都有了。

 mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘_第2张图片mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘_第3张图片

用mysqldump导出是string,对的。

#导出 数据库blade
mysqldump -u root -p blade > D:\\BaiduNetdiskDownload\\blade_chenhao_database_dump.txt


#导入
mysql -u root -p blade < D:\\BaiduNetdiskDownload\\blade_chenhao_database_dump.txt

 导出的txt文件里,找到正确的sql,是字符串,对的,就是需要这个。

INSERT INTO `gioet_instance` VALUES (10,'389767',NULL,'沙盘地区',0,0,1,1,'{\"id\": 10, \"lat\": \"1\", \"lng\": \"1\", \"city\": \"1\", \"memo\": \"\", \"contact\": \"admin\", \"district\": \"1\", \"province\": \"1\", \"entity_id\": 10}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:04',1123598821738675201,'2021-03-08 14:44:24',1,0,NULL),(12,'389767','20200001','网关',0,19,7,10,'{\"id\": 12, \"ip\": \"10.0.0.62\", \"sei\": \"1800\", \"ver\": \"2.0\", \"note\": \"\", \"model\": \"197\", \"address\": \"\", \"currVer\": \"2.0\", \"netState\": 1, \"entity_id\": 12, \"iotNumber\": \"\", \"tcpServer\": \"123.56.90.95:4031\", \"iotNumDate1\": \"\", \"iotNumDate2\": \"\", \"facilitiesId\": \"19\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:40:55',1123598821738675201,'2021-03-12 10:18:12',1,0,NULL),(13,'389767',NULL,'环境多合1',0,12,9,11,'{\"id\": 13, \"sai\": \"1800\", \"sti\": \"1800\", \"uart\": \"1\", \"offline\": \"1\", \"entity_id\": 13, \"gatewayId\": \"20200001\", \"rsAddress\": \"1\", \"smartPara\": \"\", \"smartType\": \"330\", \"connectType\": \"128\", \"smartChannel\": \"1\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:41:50',1123598821738675201,'2021-03-02 13:35:43',1,0,NULL),(15,'389767',NULL,'湿度',13,13,3,3,'{\"id\": 15, \"ADLow\": \"\", \"ADHigh\": \"\", \"DAScale\": \"2500\", \"smartId\": \"13\", \"limitLow\": \"\", \"location\": \"\", \"character\": \"\", \"entity_id\": 15, \"limitHigh\": \"\", \"checkValue\": \"0\", \"sensorPara\": \"\", \"sensorType\": \"35\", \"showLength\": \"\", \"channelType\": \"190\", \"connectType\": \"128\", \"readoutUnit\": \"\", \"facilitiesId\": \"1\", \"sensorChannel\": \"0\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:43:25',1123598821738675201,'2021-02-24 21:20:49',1,0,NULL),(16,'389767',NULL,'温度1',13,13,3,3,'{\"id\": 16, \"ADLow\": \"\", \"ADHigh\": \"\", \"DAScale\": \"2500\", \"smartId\": \"13\", \"limitLow\": \"\", \"location\": \"\", \"character\": \"\", \"entity_id\": 16, \"limitHigh\": \"\", \"checkValue\": \"0\", \"sensorPara\": \"\", \"sensorType\": \"35\", \"showLength\": \"\", \"channelType\": \"190\", \"connectType\": \"128\", \"readoutUnit\": \"\", \"sensorChannel\": \"1\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:44:33',1123598821738675201,'2021-03-12 16:49:02',1,0,NULL),(17,'389767',NULL,'光照',13,13,3,3,'{\"id\": 17, \"ADLow\": \"\", \"ADHigh\": \"\", \"DAScale\": \"2500\", \"smartId\": \"13\", \"limitLow\": \"\", \"location\": \"\", \"character\": \"\", \"entity_id\": 17, \"limitHigh\": \"\", \"checkValue\": \"0\", \"sensorPara\": \"\", \"sensorType\": \"33\", \"showLength\": \"\", \"channelType\": \"190\", \"connectType\": \"128\", \"readoutUnit\": \"\", \"facilitiesId\": \"1\", \"sensorChannel\": \"2\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:45:26',1123598821738675201,'2021-02-24 21:20:53',1,0,NULL),(18,'389767',NULL,'大气压',13,13,3,3,'{\"id\": 18, \"ADLow\": \"\", \"ADHigh\": \"\", \"DAScale\": \"2500\", \"smartId\": \"13\", \"limitLow\": \"\", \"location\": \"\", \"character\": \"\", \"entity_id\": 18, \"limitHigh\": \"\", \"checkValue\": \"0\", \"sensorPara\": \"\", \"sensorType\": \"225\", \"showLength\": \"\", \"channelType\": \"190\", \"connectType\": \"128\", \"readoutUnit\": \"\", \"facilitiesId\": \"1\", \"sensorChannel\": \"3\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:46:01',1123598821738675201,'2021-02-24 21:20:55',1,0,NULL),(19,'389767',NULL,'大棚',0,10,2,2,'{\"id\": 19, \"phone\": \"\", \"contact\": \"admin\", \"location\": \"1\", \"entity_id\": 19, \"gatewayId\": \"20200001\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 15:33:39',1123598821738675201,'2021-03-05 10:31:19',1,0,NULL),(22,'389767',NULL,'告警',NULL,19,NULL,24,'{\"id\": 22, \"high\": \"\", \"level\": \"\", \"lower\": \"\", \"offset\": \"\", \"senoriId\": \"\", \"entity_id\": 22, \"gatewayId\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-06 14:10:55',1123598821738675201,'2021-03-06 14:10:55',1,0,NULL),(23,'389767',NULL,'昌平地区',NULL,0,NULL,1,'{\"id\": 23, \"lat\": \"\", \"lng\": \"\", \"city\": \"\", \"memo\": \"\", \"phone\": \"\", \"address\": \"\", \"contact\": \"\", \"district\": \"\", \"province\": \"\", \"entity_id\": 23}',NULL,1123598821738675201,1123598813738675201,'2021-03-06 14:22:07',1123598821738675201,'2021-03-06 14:22:07',1,0,NULL),(24,'389767',NULL,'摄像头',NULL,19,6,141,'{\"id\": 24, \"type\": \"\", \"url_hls\": \"http://hls01open.ys7.com/openlive/678be8dc5ce54feb\", \"deviceId\": \"\", \"url_rtmp\": \"rtmp://rtmp01open.ys7.com/openlive/678be8dc5ce54fe\", \"entity_id\": 24}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL),(25,'389767',NULL,'格控_启停',0,12,5,11,'{\"id\": 25, \"sai\": \"1800\", \"sti\": \"1800\", \"uart\": \"1\", \"offline\": \"1\", \"entity_id\": 25, \"gatewayId\": \"20200001\", \"rsAddress\": \"1\", \"smartPara\": \"\", \"smartType\": \"315\", \"connectType\": \"128\", \"smartChannel\": \"1\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:41:50',1123598821738675201,'2021-03-02 13:35:43',1,0,NULL),(26,'389767',NULL,'外通风_控制#1',25,25,5,3,'{\"id\": 26, \"ADLow\": \"\", \"ADHigh\": \"\", \"DAScale\": \"2500\", \"smartId\": \"25\", \"limitLow\": \"\", \"location\": \"\", \"character\": \"\", \"entity_id\": 26, \"limitHigh\": \"\", \"checkValue\": \"0\", \"sensorPara\": \"0,1\", \"sensorType\": \"1\", \"showLength\": \"\", \"channelType\": \"2\", \"connectType\": \"128\", \"readoutUnit\": \"\", \"facilitiesId\": \"1\", \"sensorChannel\": \"0,1\"}',NULL,1123598821738675201,1123598813738675201,'2021-02-09 14:43:25',1123598821738675201,'2021-03-12 14:41:25',1,0,NULL),(27,'389767',NULL,'摄像头2',NULL,10,6,141,'{\"id\": 27, \"type\": \"\", \"url_hls\": \"http://hls01open.ys7.com/openlive/678be8dc5ce54feb\", \"deviceId\": \"\", \"url_rtmp\": \"rtmp://rtmp01open.ys7.com/openlive/678be8dc5ce54fe\", \"entity_id\": 27}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-06 11:23:54',1,0,NULL),(28,'389767',NULL,'玉米_种值计划',0,19,10,181,'{\"id\": 28, \"Node\": \"[{\\\"pos\\\":\\\"备播期0\\\",\\\"start0\\\":\\\"2021-05-19\\\",\\\"end0\\\":\\\"2021-06-02\\\",\\\"start\\\":\\\"2021-05-19\\\",\\\"end\\\":\\\"2021-06-02\\\",\\\"day\\\":\\\"13\\\",\\\"job\\\":[{\\\"type\\\":\\\"0\\\",\\\"name\\\":\\\"整地\\\",\\\"cond\\\":\\\"无\\\",\\\"ope\\\":\\\"播前整地,若秋季未整地,可于播种前两周进行顶浆整地。\\\",\\\"inputs\\\":[{\\\"input\\\":\\\"水\\\",\\\"num\\\":\\\"1\\\"}],\\\"tools\\\":[{\\\"tool\\\":\\\"犁\\\",\\\"num\\\":\\\"1\\\"},{\\\"tool\\\":\\\"牛\\\",\\\"num\\\":\\\"1\\\"}]},{\\\"type\\\":\\\"0\\\",\\\"name\\\":\\\"施肥\\\",\\\"cond\\\":\\\"实施条件\\\",\\\"ope\\\":\\\"可种、肥同播\\\",\\\"inputs\\\":[{\\\"input\\\":\\\"方案1:尿素13kg\\\",\\\"num\\\":\\\"1\\\"},{\\\"input\\\":\\\"硫酸钾8.3kg\\\",\\\"num\\\":\\\"1\\\"}],\\\"tools\\\":[{\\\"tool\\\":\\\"锄头\\\",\\\"num\\\":\\\"2\\\"}]}]},{\\\"pos\\\":\\\"播种期1\\\",\\\"start0\\\":\\\"2021-06-2\\\",\\\"end0\\\":\\\"2021-06-09\\\",\\\"start\\\":\\\"2021-06-02\\\",\\\"end\\\":\\\"2021-06-09\\\",\\\"day\\\":\\\"7\\\"}]\", \"Seed\": \"玉米\", \"Mechanic\": \"1\", \"Telephone\": \"18910111111\", \"entity_id\": 28, \"FacilitiesID\": \"19\", \"PlantingArea\": \"10\", \"PlantingPlan\": \"{}\", \"ActualEndTime\": \"2021-05-24 21:20:49\", \"CropVarieties\": \"1\", \"PersonInCharge\": \"admin\", \"EstimatedEndTime\": \"2021-05-24 21:20:49\", \"TraceabilityCode\": \"000001\", \"PlantingStartTime\": \"2021-02-24 21:20:49\", \"EstimatedProduction\": \"20\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-05-07 16:16:23',1,0,NULL),(29,'389767',NULL,'玉米_种值方案',0,19,191,196,'{\"id\": 29, \"Name\": \"玉米\", \"Seed\": \"玉米\", \"Scheme\": \"[ { \\\"pos\\\":\\\"备播期0\\\", \\\"start0\\\":\\\"2021-05-19\\\", \\\"end0\\\":\\\"2021-06-02\\\", \\\"start\\\":\\\"2021-05-19\\\", \\\"end\\\":\\\"2021-06-02\\\", \\\"day\\\":\\\"13\\\",        \\\"job\\\":[ {     \\\"type\\\":\\\"0\\\",     \\\"name\\\":\\\"整地\\\",     \\\"cond\\\":\\\"无\\\",     \\\"ope\\\":\\\"播前整地,若秋季未整地,可于播种前两周进行顶浆整地。\\\",     \\\"inputs\\\":[         {             \\\"input\\\":\\\"水\\\",             \\\"num\\\":\\\"1\\\"         }     ],     \\\"tools\\\":[         {             \\\"tool\\\":\\\"犁\\\",             \\\"num\\\":\\\"1\\\"         },         {             \\\"tool\\\":\\\"牛\\\",             \\\"num\\\":\\\"1\\\"         }     ] }, {     \\\"type\\\":\\\"0\\\",     \\\"name\\\":\\\"施肥\\\",     \\\"cond\\\":\\\"实施条件\\\",     \\\"ope\\\":\\\"可种、肥同播\\\",     \\\"inputs\\\":[         {             \\\"input\\\":\\\"方案1:尿素13kg\\\",             \\\"num\\\":\\\"1\\\"         },         {             \\\"input\\\":\\\"硫酸钾8.3kg\\\",             \\\"num\\\":\\\"1\\\"         }     ],     \\\"tools\\\":[         {             \\\"tool\\\":\\\"锄头\\\",             \\\"num\\\":\\\"2\\\"         }     ] } ] }, { \\\"pos\\\":\\\"播种期1\\\", \\\"start0\\\":\\\"2021-06-2\\\", \\\"end0\\\":\\\"2021-06-09\\\", \\\"start\\\":\\\"2021-06-02\\\", \\\"end\\\":\\\"2021-06-09\\\", \\\"day\\\":\\\"7\\\"      } ]\", \"PhotoURL\": \"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fdpic.tiankong.com%2Fce%2Fcj%2FQJ6972940103.jpg&refer=http%3A%2F%2Fdpic.tiankong.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1621060219&t=ce16b5e036e92d37efe671528e7483d2\", \"entity_id\": 29, \"CropVarieties\": \"玉米\", \"PlantingCycle\": \"100\", \"RelevantExperts\": \"陈博士\", \"DnowledgeBaseURL\": \"https://www.plantplus.cn/cn/sp/%E7%8E%89%E8%9C%80%E9%BB%8D?t=p\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-28 14:02:42',1,0,NULL),(30,'389767',NULL,'玉米_农事记录',0,19,191,194,'{\"id\": 30, \"Type\": \"农事操作\", \"Inputs\": \"111\", \"EndDate\": \"2021-04-14T16:00:00.000Z\", \"Describe\": \"111\", \"Mechanic\": \"1111\", \"WorkType\": \"111\", \"StartDate\": \"2021-04-14T16:00:00.000Z\", \"entity_id\": 30, \"DelayReason\": \"农忙\", \"TraceabilityID\": \"11111\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-15 15:31:14',1,0,NULL),(31,'389767',NULL,'玉米_农技服务记录',0,19,191,197,'{\"id\": 31, \"State\": \"OK\", \"entity_id\": 31, \"ServiceFee\": \"10\", \"ServiceTime\": \"111\", \"ServiceType\": \"ddd\", \"CustomerCode\": \"111\", \"ServicePerson\": \"ddd\", \"ServiceContent\": \"ddd\", \"ApplicationTime\": \"dddd\", \"ApplicationContent\": \"11\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-15 15:31:18',1,0,NULL),(32,'389767',NULL,'玉米_识别记录',0,0,191,195,'{\"id\": 32, \"Type\": \"病害\", \"State\": \"专家已识别\", \"Category\": \"玉米\", \"PhotoURL\": \"http://img6.iplant.cn/image2/b/4090976.jpg\", \"Applicant\": \"admin\", \"entity_id\": 32, \"EngineResults\": \"[             {                 \\\"id\\\": 1112,                 \\\"name\\\": \\\"瘤黑粉病\\\",                 \\\"probability\\\": \\\"97%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/B63E26BD39BB5E42.jpg\\\"             },             {                 \\\"id\\\": 1145,                 \\\"name\\\": \\\"大斑病\\\",                 \\\"probability\\\": \\\"2.7%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/EAF51986E004E65C.jpg\\\"             },             {                 \\\"id\\\": 111172,                 \\\"name\\\": \\\"黑丝穗病\\\",                 \\\"probability\\\": \\\"0.3%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/DC29B989B88EAA9D.jpg\\\"             }         ]\", \"IdentifyPeople\": \"李教授\", \"ArtificialResults\": \"[             {                 \\\"id\\\": 1112,                 \\\"name\\\": \\\"瘤黑粉病\\\",                 \\\"probability\\\": \\\"97%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/B63E26BD39BB5E42.jpg\\\"             },             {                 \\\"id\\\": 1145,                 \\\"name\\\": \\\"大斑病\\\",                 \\\"probability\\\": \\\"2.7%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/EAF51986E004E65C.jpg\\\"             },             {                 \\\"id\\\": 111172,                 \\\"name\\\": \\\"黑丝穗病\\\",                 \\\"probability\\\": \\\"0.3%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/DC29B989B88EAA9D.jpg\\\"             }         ]\", \"IdentificationTime\": \"2021-04-27T16:00:00.000Z\", \"EngineDisplayResults\": \"[             {                 \\\"id\\\": 1112,                 \\\"name\\\": \\\"瘤黑粉病\\\",                 \\\"probability\\\": \\\"97%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/B63E26BD39BB5E42.jpg\\\"             },             {                 \\\"id\\\": 1145,                 \\\"name\\\": \\\"大斑病\\\",                 \\\"probability\\\": \\\"2.7%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/EAF51986E004E65C.jpg\\\"             },             {                 \\\"id\\\": 111172,                 \\\"name\\\": \\\"黑丝穗病\\\",                 \\\"probability\\\": \\\"0.3%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/DC29B989B88EAA9D.jpg\\\"             }         ]\", \"IdentificationDevice\": \"1-手机\", \"ArtificialResultsDisplay\": \"[             {                 \\\"id\\\": 1112,                 \\\"name\\\": \\\"瘤黑粉病\\\",                 \\\"probability\\\": \\\"97%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/B63E26BD39BB5E42.jpg\\\"             },             {                 \\\"id\\\": 1145,                 \\\"name\\\": \\\"大斑病\\\",                 \\\"probability\\\": \\\"2.7%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/EAF51986E004E65C.jpg\\\"             },             {                 \\\"id\\\": 111172,                 \\\"name\\\": \\\"黑丝穗病\\\",                 \\\"probability\\\": \\\"0.3%\\\",                 \\\"imageUrl\\\": \\\"http://img1.iplant.cn/gotoimg/236/DC29B989B88EAA9D.jpg\\\"             }         ]\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-04-28 16:34:19',1,0,NULL),(34,'389767',NULL,'玉米_识别记录2',0,0,191,195,'{\"id\": 34}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL),(1377153719320498178,NULL,NULL,NULL,NULL,0,NULL,197,'{\"id\": 1377153719320498178, \"State\": \"\", \"entity_id\": 1377153719320498178, \"ServiceFee\": \"\", \"ServiceTime\": \"\", \"ServiceType\": \"\", \"CustomerCode\": \"\", \"ServicePerson\": \"\", \"ServiceContent\": \"\", \"ApplicationTime\": \"asdaa\", \"ApplicationContent\": \"sdasd\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:00:08',1123598821738675201,'2021-03-31 15:00:08',1,0,NULL),(1377154764167761921,NULL,NULL,NULL,NULL,0,NULL,197,'{\"id\": 1377154764167761921, \"State\": \"\", \"entity_id\": 1377154764167761921, \"ServiceFee\": \"000\", \"ServiceTime\": \"2021-06-08\", \"ServiceType\": \"农事服务\", \"CustomerCode\": \"\", \"ServicePerson\": \"六号位\", \"ServiceContent\": \"搜索\", \"ApplicationTime\": \"2020-05-06\", \"ApplicationContent\": \"1654\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:04:17',1123598821738675201,'2021-03-31 15:04:17',1,0,NULL),(1377158466677035009,NULL,NULL,NULL,NULL,0,NULL,197,'{\"id\": 1377158466677035009, \"State\": \"未完成\", \"entity_id\": 1377158466677035009, \"ServiceFee\": \"十大\", \"ServiceTime\": \"阿萨达a\", \"ServiceType\": \"阿萨达\", \"CustomerCode\": \"\", \"ServicePerson\": \"阿萨达\", \"ServiceContent\": \"阿萨达\", \"ApplicationTime\": \"asd\", \"ApplicationContent\": \"asd\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-31 15:18:59',1123598821738675201,'2021-03-31 15:19:00',1,0,NULL),(1380781728606769154,NULL,NULL,NULL,NULL,0,NULL,197,'{\"id\": 1380781728606769154, \"State\": \"未完成\", \"entity_id\": 1380781728606769154, \"ServiceFee\": \"sss\", \"ServiceTime\": \"sss\", \"ServiceType\": \"ss\", \"CustomerCode\": \"\", \"ServicePerson\": \"sss\", \"ServiceContent\": \"sss\", \"ApplicationTime\": \"试试\", \"ApplicationContent\": \"ss\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-10 15:16:32',1123598821738675201,'2021-04-10 15:16:33',1,0,NULL),(1383562487222554626,NULL,NULL,NULL,NULL,0,NULL,181,'{\"id\": 1383562487222554626, \"Node\": \"\", \"Seed\": \"123\", \"Mechanic\": \"\", \"Telephone\": \"awedaw\", \"entity_id\": 1383562487222554626, \"FacilitiesID\": \"\", \"PlantingArea\": \"123\", \"PlantingPlan\": \"我说的\", \"ActualEndTime\": \"sd2\", \"CropVarieties\": \"2123\", \"PersonInCharge\": \"awee2\", \"EstimatedEndTime\": \"as2w\", \"TraceabilityCode\": \" 咋啥大事的231222\", \"PlantingStartTime\": \"asd\", \"EstimatedProduction\": \"45\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 07:26:17',1123598821738675201,'2021-04-18 07:26:17',1,0,NULL),(1383567415483617282,NULL,NULL,NULL,NULL,0,NULL,181,'{\"id\": 1383567415483617282, \"Node\": \"\", \"Seed\": \"222\", \"Mechanic\": \"\", \"Telephone\": \"22\", \"entity_id\": 1383567415483617282, \"FacilitiesID\": \"19\", \"PlantingArea\": \"222\", \"PlantingPlan\": \"222222222\", \"ActualEndTime\": \"22\", \"CropVarieties\": \"22\", \"PersonInCharge\": \"22222\", \"EstimatedEndTime\": \"22222\", \"TraceabilityCode\": \"2222\", \"PlantingStartTime\": \"2222\", \"EstimatedProduction\": \"22222\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 07:45:52',1123598821738675201,'2021-04-18 07:45:52',1,0,NULL),(1383664210461118465,NULL,NULL,NULL,NULL,0,NULL,195,'{\"id\": 1383664210461118465, \"Type\": \"\", \"State\": \"等待专家识别\", \"Category\": \"番茄\", \"PhotoURL\": \"http://123.56.90.95:9000/gioetadmin/upload/20210418/47ee7e8e149c8e594c1aaa48a9552233.png\", \"Applicant\": \"管理员\", \"entity_id\": 1383664210461118465, \"EngineResults\": \"\", \"IdentifyPeople\": \"\", \"ArtificialResults\": \"\", \"IdentificationTime\": \"\", \"EngineDisplayResults\": \"\", \"IdentificationDevice\": \"\", \"ArtificialResultsDisplay\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:10:30',1123598821738675201,'2021-04-18 14:10:30',1,0,NULL),(1383664407870230529,NULL,NULL,NULL,NULL,0,NULL,195,'{\"id\": 1383664407870230529, \"Type\": \"\", \"State\": \"等待专家识别\", \"Category\": \"番茄\", \"PhotoURL\": \"http://123.56.90.95:9000/gioetadmin/upload/20210418/47ee7e8e149c8e594c1aaa48a9552233.png\", \"Applicant\": \"管理员\", \"entity_id\": 1383664407870230529, \"EngineResults\": \"\", \"IdentifyPeople\": \"\", \"ArtificialResults\": \"\", \"IdentificationTime\": \"\", \"EngineDisplayResults\": \"\", \"IdentificationDevice\": \"\", \"ArtificialResultsDisplay\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:11:17',1123598821738675201,'2021-04-18 14:11:17',1,0,NULL),(1383664480184225793,NULL,NULL,NULL,NULL,0,NULL,195,'{\"id\": 1383664480184225793, \"Type\": \"\", \"State\": \"等待专家识别\", \"Category\": \"番茄\", \"PhotoURL\": \"http://123.56.90.95:9000/gioetadmin/upload/20210418/47ee7e8e149c8e594c1aaa48a9552233.png\", \"Applicant\": \"管理员\", \"entity_id\": 1383664480184225793, \"EngineResults\": \"\", \"IdentifyPeople\": \"\", \"ArtificialResults\": \"\", \"IdentificationTime\": \"\", \"EngineDisplayResults\": \"\", \"IdentificationDevice\": \"\", \"ArtificialResultsDisplay\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 14:11:34',1123598821738675201,'2021-04-18 14:11:34',1,0,NULL),(1383679592320258049,NULL,NULL,NULL,NULL,0,NULL,195,'{\"id\": 1383679592320258049, \"Type\": \"\", \"State\": \"等待专家识别\", \"Category\": \"番茄\", \"PhotoURL\": \"http://123.56.90.95:9000/gioetadmin/upload/20210418/10ec3623fee7de8a68b8872c5e5658eb.png\", \"Applicant\": \"管理员\", \"entity_id\": 1383679592320258049, \"EngineResults\": \"\", \"IdentifyPeople\": \"\", \"ArtificialResults\": \"\", \"IdentificationTime\": \"\", \"EngineDisplayResults\": \"\", \"IdentificationDevice\": \"\", \"ArtificialResultsDisplay\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:11:37',1123598821738675201,'2021-04-18 15:11:37',1,0,NULL),(1383681284189245441,'389767',NULL,'测试',NULL,19,NULL,153,'{\"id\": 1383681284189245441, \"para\": \"\", \"smartId\": \"\", \"timeEnd\": \"\", \"sensorId\": \"\", \"timeStar\": \"\", \"entity_id\": 1383681284189245441, \"gatewayId\": \"\", \"smartChannel\": \"\", \"sensorChannel\": \"\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:18:20',1123598821738675201,'2021-04-18 15:18:20',1,0,NULL),(1383683644902920194,NULL,NULL,NULL,NULL,0,NULL,197,'{\"id\": 1383683644902920194, \"State\": \"未完成\", \"entity_id\": 1383683644902920194, \"ServiceFee\": \"00\", \"ServiceTime\": \"0\", \"ServiceType\": \"00\", \"CustomerCode\": \"\", \"ServicePerson\": \"00\", \"ServiceContent\": \"00\", \"ApplicationTime\": \"0000\", \"ApplicationContent\": \"00\"}',NULL,1123598821738675201,1123598813738675201,'2021-04-18 15:27:43',1123598821738675201,'2021-04-18 15:27:43',1,0,NULL),(1383683644902920200,'389767',NULL,'玉米_识别记录',0,0,191,195,'{\"id\": 1383683644902920200, \"PhotoURL\": \"undefined\"}',NULL,1123598821738675201,1123598813738675201,'2021-03-12 10:53:33',1123598821738675201,'2021-03-12 10:57:54',1,0,NULL);

在生产服务器mysql先备份,再执行上面sql, 查看数据库正常,完成。

mysqldump -u root -p blade > /home/blade_chenhao_database_dump.txt
mysql -u root -p blade < /home/blade_chenhao_database_dump.txt

 

5.自带的导出mysqldump再导入也有问题

但跟上面不是同一表,不是同一问题,先放一边。我只要上面一个表的数。 

mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘_第4张图片

mysql-Front有json类型恢复不了数据库解决方法Connot create a JSON value from a string with CHARACTER SET ‘binary‘_第5张图片

 

你可能感兴趣的:(日志,mysql,json,恢复,备份,数据库)