Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
- Recent Linux turn win10, modify invalid coding when installing MySQL, did not find a lot of programs a success in this hereby record it.
- Note: MySQL5.7 install version Download https://dev.mysql.com/downloads/mysql/ ,
after entering click
to download the old version 5.7
One, first of all talk about the online program, add my.ini file in the MySQL installation directory, file content:
```
[client]
default-character-set=utf8
[mysqld]
character-set-server=utf8
```
After the modification restart MySQL, log in to view coding show variables like '%char%';
see character_set_database and character_set_server still latin1, then the question is, how to change the coding of these two?
Second, the solution
I finally found the C drive has a hidden folder ProgramData, which find the next there is a MySQL my.ini,
- Found [mysql], add # default-character-set = next line
default-character-set=utf8
- Find [mysqld], add the # character-set-server = next line
character-set-server=utf8
to restart MySQL again to see code, modified successfully