To set the collation to utf8mb4, you can use the following command:

ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Replace "database_name" with the name of your database. This command will change the character set to utf8mb4 and the collation to utf8mb4_unicode_ci.

Note that you may need to modify the collation for individual tables and columns as well, using similar commands.

mysql 56 ERROR 1273 HY000 Unknown collation utf8mb4_0900_ai_ci 设置成utf8mb4

原文地址: https://www.cveoy.top/t/topic/b6N4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录