Solve mysql Chinese display, solve mysql Chinese
1. view the mysql character setting method, as shown in. If it is not gbk, perform related settings.
Mysql> SETCharacter_set_client=Gbk;
Mysql> SETCharacter_set_connection=Gbk;
Mysql> SETCharacter_set_database=Gbk;
Mysql> SETCharacter_set_results=Gbk;
Mysql> SETCharacter_set_server=Gbk;
Mysql> SETCollation_connection=Gbk_bin;
Mysql> SETCollation_database=Gbk_bin;
Mysql> SETCollation_server=Gbk_bin;
2. Select database and table settings, as shown in figure
3. Check whether the problem is displayed or not. Try: SELECT 'salary total', SUM (FSalary) FROM T_Employee; statement;
At this time, it is displayed correctly, and later I was wondering if it was a union problem, so I tried again: SELECT 'maximum age of formal employees ', MAX (FAge) as 'age' FROM T_Employee union select 'minimum formal employee age', MIN (FAge) FROM T_Employee; statement is also correct.
I thought it was a field type setting problem, but it was still incorrect after the attempt. I don't know why.