Mysql error 1267: Illegal mix of collations

Post Reply
peak
Posts: 36
Joined: Wed Apr 15, 2020 1:00 pm

Mysql error 1267: Illegal mix of collations

Post by peak »

Доброго дня. Такая ошибка на сайтах:
Core error: Mysql error 1267: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' (Notice:: Mysql and Web encoding mismatch, please contact script support)

админы просили узнать, какую кодировку можно применять
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1267: Illegal mix of collations

Post by admin »

Приветствую!

можно просто в конфиг добавить

$config["db_charset"] = 'utf8mb4';
Don't forget to run script update
Andrew1
Posts: 981
Joined: Fri Nov 30, 2012 1:18 pm
Contact:

Re: Mysql error 1267: Illegal mix of collations

Post by Andrew1 »

Тоже похожая ошибка в варнингах выскочила после того, как сделал Export trades с другого сайта:

Notice! You have set db_charset in config.php to utf8mb4, this forces connection to MySQL to be utf8mb4_general_ci, but table collation of rot_models is set to utf8_general_ci You need either to remove db_charset from settings or changed table's collation to utf8mb4_general_ci otherwise you might have encoding issues. Please, contqct support if you believe it's wrong.

Теперь страница с трейдерами не открывается, браузер пишет, что Content Encoding Error
Никаких манипуляций с db_charset на этих сайтах не поводилось, на сайте-доноре более старый билд - 202306121347
Как с этим бороться?
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1267: Illegal mix of collations

Post by admin »

db_charset in config.php to utf8mb4,

что если просто убрать?
Don't forget to run script update
Andrew1
Posts: 981
Joined: Fri Nov 30, 2012 1:18 pm
Contact:

Re: Mysql error 1267: Illegal mix of collations

Post by Andrew1 »

Закомментировал, варнинг пропал, но Content Encoding Error на странице admin/?operation=trade&sub=& так и остался...
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1267: Illegal mix of collations

Post by admin »

значит что-то еще я не предусмотрел что могут сделать при копировании базы с другого сайта
скидывайте где что как доступы
Don't forget to run script update
Andrew1
Posts: 981
Joined: Fri Nov 30, 2012 1:18 pm
Contact:

Re: Mysql error 1267: Illegal mix of collations

Post by Andrew1 »

скинул
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1267: Illegal mix of collations

Post by admin »

те все ок?
Don't forget to run script update
Andrew1
Posts: 981
Joined: Fri Nov 30, 2012 1:18 pm
Contact:

Re: Mysql error 1267: Illegal mix of collations

Post by Andrew1 »

да, все ок, извините за беспокойство!
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Mysql error 1267: Illegal mix of collations

Post by admin »

NP
Don't forget to run script update
Post Reply