Reference blog:
http://mayue85.blog.163.com/blog/static/553886092010317111348552/
There was a problem connecting the database with the Java EE: illegal mix of collations (utf8_general_ci,coercible) and (latin1_swedish_ci,implicit)
The error means that there are two sets of characters in the result set.
Anyway, it means that some two places have different encoding formats, so you have to set them up to solve the problem.
My goal is to set all the properties to UTF8.
To view the MySQL character set settings:
SHOW VARIABLES like ' character_set_% ';
SHOW VARIABLES like ' collation_% ';
Change the character set settings all to UTF8:
Set Character_set_database =utf8;
Set Character_set_results =utf8;
Set Character_set_server =utf8;
Set Character_set_system =utf8;
SET Collation_server = Utf8_general_ci
SET collation_database = Utf8_general_ci
To display the encoding properties for each column of the table:
Show full columns from Table_user;
To modify the encoding properties of a table:
ALTER TABLE Table_user convert to character set UTF8;
Resolution: illegal mix of collations (utf8_general_ci,coercible) and (latin1_swedish_ci,implicit)