#1115 - 未知字符集:'utf8mb4' [英] #1115 - Unknown character set: 'utf8mb4'

查看:660
本文介绍了#1115 - 未知字符集:'utf8mb4'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地网络服务器在我的电脑上运行,用于本地开发。我现在处于导出数据库并导入到我托管的VPS的阶段。



当导出然后导入时,我得到以下错误!



1115 - 未知字符集:'utf8mb4'



有人可能指向正确的方向吗?


<有时我得到类似的问题,而使用HeidiSQL默认导出utf8mb4字符编码。并非所有MySQL安装都支持此编码,并且导入此类数据会导致类似的错误消息。我的解决方法是使用phpMyAdmin导出数据,它在utf8导出。可能有其他工具和可能的方法,如手动编辑转储文件,将其从utf8mb4转换为utf8(如果需要),并将 SET NAMES utf8mb4 更改为 SET NAMES utf8 。 Utf8mb4是utf8的超集,所以如果你绝对确定,你的数据只是utf8,那么你可以简单地将 SET NAMES 在转储文件中更改为 utf8


I have a local webserver running on my pc to which I use for local development. I'm now at the stage of exporting the database and importing onto my hosted VPS.

When exporting then importing I get the following error!

1115 - Unknown character set: 'utf8mb4'

Can somebody point me in the right direction?

解决方案

Sometimes I get similar problems while using HeidiSQL which by default exports in utf8mb4 character encoding. Not all MySQL installations support this encoding and importing such data leads to similar error messages. My workaround then is to export data using phpMyAdmin, which exports in utf8. There are problably other tools and possible ways like manually editing dump file, converting it from utf8mb4 to utf8 (if needed) and changing SET NAMES utf8mb4 to SET NAMES utf8. Utf8mb4 is a superset of utf8, so if you're absolutely sure, that your data is just utf8, then you can simply change SET NAMES in dump file to utf8.

这篇关于#1115 - 未知字符集:'utf8mb4'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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