Troubleshooting of MySQL errors: Difference between revisions

Jump to navigation Jump to search
Line 329: Line 329:


</pre>
</pre>
=== ERROR 1267: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'concat' ===
Error condition: Tried to concat different type of data e.g. CONCAT(string, int)
Solution: {{kbd | key =<nowiki>SELECT CONCAT(`string_column`, CONVERT(`int_column`, CHAR))</nowiki>}} or {{kbd | key =<nowiki>SELECT CONCAT(`string_column`, CAST(`int_column` AS CHAR))</nowiki>}}<ref>[https://stackoverflow.com/questions/15368753/cast-int-to-varchar mysql - Cast int to varchar - Stack Overflow]</ref><ref>[http://blog.51cto.com/bian5399/1092772 mysql字符集问题:Illegal mix of collations-每天让自己进步一点-51CTO博客]</ref>


== Connection and Network Errors ==
== Connection and Network Errors ==

Navigation menu