简体   繁体   English

未知字符集:'utf8mb4'

[英]Unknown character set: 'utf8mb4'

im trying to upload my first wordpress website.我正在尝试上传我的第一个 wordpress 网站。 Im using the local wordpress.org php my admin and the php my admin from 000webhost.我使用本地 wordpress.org php my admin 和 php my admin 来自 000webhost。 Ive researched this aa lot here and changed all the settings people were saying from utf8mb4 to utf8 but it only caused more errors.我在这里研究了很多,并将人们所说的所有设置从 utf8mb4 更改为 utf8,但这只会导致更多错误。 I changed everything back to what it was (at least i think so and the error is the same as the beginning now).我把一切都改回了原来的样子(至少我是这么认为的,而且错误与现在开始时一样)。 Anyone knows how i can get around this and import my db to 000.webhost with no errors?任何人都知道我如何解决这个问题并将我的数据库导入到 000.webhost 没有错误? the Error is SQL query:错误是 SQL 查询:

/*!40101 SET NAMES utf8mb4 */; /*!40101 设置名称 utf8mb4 */;

and

MySQL said: Documentation MySQL 说: 文档

1115 - Unknown character set: 'utf8mb4' 1115 - 未知字符集:'utf8mb4'

1) The first: If you can control ssh server. 1)第一个:如果可以控制ssh服务器。 Please update mysql version.请更新mysql版本。 Your mysql too old.你的mysql太旧了。 Maybe < 5.5.3 .也许< 5.5.3

2) The second: If you can't access ssh. 2)第二个:如果你不能访问ssh。 Try to export your database with Mysql version 4.0 .尝试使用Mysql version 4.0导出您的数据库。

  • With command line mysqldump --compatible=mysql40 -u user -p DB > dumpfile.sql使用命令行mysqldump --compatible=mysql40 -u user -p DB > dumpfile.sql
  • With web access phpmyadmin -> Select Database -> Export -> Custom - display all possible options -> Format-specific options ->通过网络访问phpmyadmin -> 选择数据库 -> 导出 -> 自定义 - 显示所有可能的选项 -> 特定格式选项 ->

    Database system or older MySQL server to maximize output compatibility with: Select MYSQL40 .数据库系统或较旧的 MySQL 服务器以最大限度地提高输出兼容性:选择MYSQL40

  • Change content file .sql you exported更改您导出的内容文件 .sql

/*!50003 SET character_set_client = utf8mb4 */ ;

to utf8 only.仅限utf8

And replace by Ctrl H in Sublime change all from utf8mb4 => utf8并在 Sublime 中替换为 Ctrl H 全部更改为utf8mb4 => utf8

Hope this helps.希望这会有所帮助。

Just modify this into mysql Database.只需将其修改为mysql数据库即可。 wrong that modify ..... /*!40101 SET NAMES utf8mb4 /;错误修改..... /*!40101 SET NAMES utf8mb4 /;
now corrected ..... / !40101 SET NAMES utf8 */;现在更正了..... / !40101 SET NAMES utf8 */; just erase .... mb4 ....只需擦除.... mb4 ....

its work now它现在的工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM