1 to modify the configuration file
First of all we have to turn off the service in mysql service ( be sure to turn off the mysql service and then modify )
Profile --- installation directory my.ini , save the changes.
[client] 添加 default-character-set=utf8
[MySQL] Add default-character-set = utf8
[mysqld] 添加 init_connect='SET collation_connection = utf8_general_ci
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake
Note: For utf8 character sets, domestic default choice: utf8_general_ci instead utf8_unicode_ci ,
The main difference in German and French, so for us Chinese people, the general use of general , because the general faster. If the comparison of the German and French have higher requirements, only the use of Unicode , it is more than general be more accurate (in accordance with standard German and French, the more accurate the comparison or sorting)
2 Restart the mysql service
Open with administrator privileges cmd, restart the mysql service
At the command line: show variables like 'char%' ; to see whether the modified encoding
Like this it indicates that the better.