Windows off the pit, MySQL5.7 install version modified coding, pro-test available

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.
This link: https://blog.csdn.net/qq_40914991/article/details/84201395
  • 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
    Here Insert Picture Description
    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%';
Here Insert Picture Description
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,

  1. Found [mysql], add # default-character-set = next linedefault-character-set=utf8
  2. Find [mysqld], add the # character-set-server = next line character-set-server=utf8
    to restart MySQL again to see code, modified successfully
    Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_40914991/article/details/84201395