Mysql – Can’t thesql autocast encoding in query data

MySQLmysql-5.7

i am getting error "Illegal mix of collations"

i know either i need to change db tables to utf8 or convert user input to latin1 or ansii

so i want to know, can mysql do this automatically so i won't need to change table encoding and also no need to modify my exiting queries with COLLATE expression.

Best Answer

There are good explanations why MySQL can't do it automatically:

https://stackoverflow.com/a/12260863/1261575

https://stackoverflow.com/a/21061305/1261575