Import dabase bị lỗi 1273 unknown collation utf8 năm 2024

When I'm using localhost/phpmyadmin, it displays, "

1273 - Unknown collation: 'utf8mb4_unicode_ci' ". How can I solve the problem?

SolidBlock (talkcontribs)

I only found the problem in localhost/phpmyadmin. I didn't find any questions in installing wamp5 1.7.4. But using localhost/phpmyadmin is important.

87.123.19.121 (talkcontribs)

Error 1273 means that your database is using a collation, which the MySQL server does not understand. This can happen, when you use a database, which has been created with a newer version of MySQL, with an older MySQL server version. This problem can be solved by converting the wrong collations from utf8mb4_unicode_ci to utf8_general_ci. There is a script on stackoverflow, which does exactly that.

SolidBlock (talkcontribs)

I found sth in other sites:"方法一:替换编码:使用代码编辑器打开导出的sql数据文件,先查找:utf8mb4_unicode_ci,替换为:utf8_general_ci,再查找,utf8mb4,替换为,utf8。方法二:把网站要用的mysql数据库升级到5.5.3以上版本。" But do you know what "sql数据文件"(maybe means "sql data file") means?

  1. //www.boke8.net/wordpress-mysql-1273-error.html

175.106.45.205 (talkcontribs)

hello i am amin to fix this error replace all of utf8mb4_unicode_520_ci to utf8mb4_general_ci

This post was hidden by 83.135.226.11 (history)

This post was hidden by 1.23.156.56 (history)

103.68.21.240 (talkcontribs)

yes its works fine.thanks

180.94.84.248 (talkcontribs)

MySQL said:

`

1273 - Unknown collation: 'utf8mb4_persian_ci'`

i have this problem when i want to go to phpmyadmin in localhost server i couldn't solve that, can you help me to solve it?

This as part of the general sed solution here seems to also address the import hanging / freezing / getting stuck.

My database dump is very small so I only had expected it to take a few seconds to import. Before your fix it seems to take a long time, in fact I cancelled it with CTRL-C / CTRL-Z after a while.

Now, with your sed solution - it imports OK - that utf error no longer seen and the import completes after a short while.

Nếu bạn gặp lỗi Unknown collation: ‘utf8mb4_unicode_ci’ khi import cơ sở dữ liệu thì đừng quá lo lắng, bài viết này sẽ giúp bạn giải quyết vấn đề. Lỗi Unknown collation chỉ là lỗi nhỏ do không tương thích giữa các phiên bản MySQL, trên các phiên bản MySQL cũ chưa có hỗ trợ utf8mb4_unicode_ci.

Phiên bản mới nhất của WordPress cho đến thời điểm hiện tại chỉ hoạt động tốt nhất trên hosting có hỗ trợ PHP phiên bản 5.4 trở lên, và MySQL phiên bản 5.5 trở lên. Nếu hosting của bạn có số phiên bản 2 cái này thấp thì bạn có thể gửi yêu cầu đề nghị bên hosting nâng cấp phần mềm lên cho bạn.

Error SQL query: Database: thanhphovienthong --

Table structure for table sb_tt_commentmeta -- CREATE TABLE IF NOT EXISTS sb_tt_commentmeta ( meta_id bigint( 20 ) unsigned NOT NULL , comment_id bigint( 20 ) unsigned NOT NULL DEFAULT '0', meta_key varchar( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL , meta_value longtext COLLATE utf8mb4_unicode_ci ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; MySQL said: Documentation

1273 - Unknown collation: 'utf8mb4_unicode_ci'

Bây giờ quay trở lại với vấn đề của bài viết, bạn mở trình điều khiển phpMyAdmin lên, chọn lại cơ sở dữ liệu cần export, bạn chọn export theo dạng custom, bạn kéo xuống dưới và tìm dòng Database system or older MySQL server to maximize output compatibility with, chọn ở đây là MYSQL40.

Xem thêm: Xử lý lỗi Unknown collation trong phpMyAdmin

Sau khi bạn hoàn tất quá trình export, bây giờ bạn vào hosting mới và chọn import lại cơ sở dữ liệu bạn vừa lưu khi nãy. Chắc chắn là lỗi Unknown collation sẽ không còn xuất hiện nữa, chúc bạn thành công.

Lại Đình Cường

Là người sáng lập nên HocWP, yêu thích lập trình web và WordPress. Tự nghiên cứu và phát triển website dựa trên mã nguồn WordPress với hơn 13 năm kinh nghiệm. Hãy để lại bình luận nếu bạn thấy nội dung website hữu ích hoặc không.

Chủ đề