Mysql5.7 Modifying character sets

Source: Internet
Author: User
Tags mysql version

I installed the MySQL version is 5.7.20, installed MySQL will have to modify the character set, so according to most of the online tutorial said to the installation directory to find a My-default.ini file, and then renamed to My.ini, and then into the modified character set, so I opened the MySQL installation directory Under stunned, inside incredibly didn't have this file.

So spent nearly an afternoon to find a solution to the method, Kung Fu, finally found a solution to the method, specifically as follows:

1, mysql5.7.20 My.ini file is not in the installation directory, if you are the default installation of MySQL, then its My.ini file in the hidden folder C:\ProgramData\MySQL\MySQL Server 5.7

2, to modify the My.ini file, please back up a copy before the change.

Make configuration changes under the My.ini file:


[Client]
Default-character-set = UTF8

[MySQL]
Default-character-set = UTF8

[Mysqld]
Character-set-client-handshake = FALSE
Character-set-server = UTF8
Collation-server = Utf8_unicode_ci
init_connect= ' SET NAMES UTF8 '

3. After modifying the My.ini file, save and restart the MySQL service. Computer-right--management--services, find mysql57, right-click on it to stop, and then start

4, open the terminal, login MySQL and then check the character set:show variables like ' character% '; the character set is changed successfully at this time.

Mysql5.7 Modifying character sets

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.