Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sabbir345's avatar

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_unicode_ci,COERCIBLE)

Please help

0 likes
5 replies
lostdreamer_nl's avatar

Check your database, and make sure ALL of your tables (and all columns within those tables) have the same collation.

It seems you have created a few tables manually on windows (giving you by default a latin1_swedish collation) and some by the laravel migrations (giving a utf8mb4 unicode collation).

Check the db, and change all collations to utf8mb4 unicode ci.

1 like
Abdullathif's avatar

I've been check all tables and changed it to utf8mb4 Unicode collation. but nothing gonna change. is there any else that needs to change?

Tray2's avatar

If you create your own thread and describe your problem we might be able to help you instead of reopening a two year old thread.

1 like
munazzil's avatar

This error occur because of php version if your system in 7.2 change it to 7.4 or vice versa and check or else create new table with utf8mb4 because for php default 7.2 to is that and 7.4 default is utf8mb4_unicode .

rawilk's avatar

@munazzil seriously? The php version has absolutely nothing to do with this.

1 like

Please or to participate in this conversation.