MySQL 5.7.12导入无法从CHARACTER SET'binary'的字符串创建JSON值 [英] MySQL 5.7.12 import cannot create a JSON value from a string with CHARACTER SET 'binary'

查看:3195
本文介绍了MySQL 5.7.12导入无法从CHARACTER SET'binary'的字符串创建JSON值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导出了包含JSON列的数据库。迁移到新服务器后,我的导入每次都崩溃,出现如下错误:

I exported my database with JSON columns in it. After I migrated to a new server, my import crashed every time with an error like:


无法使用CHARACTER从字符串创建JSON值SET'binary'

cannot create a JSON value from a string with CHARACTER SET 'binary'

在stackoverflow上,我发现这篇文章但对我不起作用:
mysqlimport问题设置@@ character_set_database = binary"这会阻止加载json值

On stackoverflow, I found this post but didn't work for me: mysqlimport issues "set @@character_set_database=binary" which prevents loading json values

文件为2GB,无法打开文件。

The file is 2GB and isn't possible to open the file.

任何人都有想法导入我的数据库文件?

Anyone has an idea to import my database file?

推荐答案

所有MySQL JSON数据类型信息必须是UTF8MB4字符集而不是BINARY。

All MySQL JSON data type information must be UTF8MB4 character set not BINARY.

这篇关于MySQL 5.7.12导入无法从CHARACTER SET'binary'的字符串创建JSON值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆